Module: Turbopuffer::Models::DistanceMetric
- Extended by:
- Internal::Type::Enum
- Defined in:
- lib/turbopuffer/models/distance_metric.rb
Overview
A function used to calculate vector similarity.
Constant Summary collapse
- COSINE_DISTANCE =
Defined as ‘1 - cosine_similarity` and ranges from 0 to 2. Lower is better.
:cosine_distance- EUCLIDEAN_SQUARED =
Defined as ‘sum((x - y)^2)`. Lower is better.
:euclidean_squared
Class Method Summary collapse
Methods included from Internal::Type::Enum
==, ===, coerce, dump, hash, inspect, to_sorbet_type, values
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/turbopuffer/models/distance_metric.rb', line 15
|