Struct CosineSimilarityOptions¶
Defined in File distance.h
Page Contents
Struct Documentation¶
-
struct CosineSimilarityOptions¶
Options for the
CosineSimilarity
module.Example:
CosineSimilarity model(CosineSimilarityOptions().dim(0).eps(0.5));
Public Functions
-
inline auto dim(const int64_t &new_dim) -> decltype(*this)¶
Dimension where cosine similarity is computed. Default: 1.
-
inline auto dim(int64_t &&new_dim) -> decltype(*this)¶
-
inline const int64_t &dim() const noexcept¶
-
inline int64_t &dim() noexcept¶
-
inline auto eps(const double &new_eps) -> decltype(*this)¶
Small value to avoid division by zero. Default: 1e-8.
-
inline auto eps(double &&new_eps) -> decltype(*this)¶
-
inline const double &eps() const noexcept¶
-
inline double &eps() noexcept¶
-
inline auto dim(const int64_t &new_dim) -> decltype(*this)¶