pub struct DistributionShift {
pub current_mean: OrderedFloat<f32>,
pub current_sigma: OrderedFloat<f32>,
}
Expand description
Describes the mean and sigma of distribution of embedding similarity in the embedding space.
The intended use is to make the similarity score more comparable to the regular ranking score. This allows to correct effects where results are too “packed” around a certain value.
Fields§
§current_mean: OrderedFloat<f32>
Value where the results are “packed”.
Similarity scores are translated so that they are packed around 0.5 instead
current_sigma: OrderedFloat<f32>
standard deviation of a similarity score.
Set below 0.4 to make the results less packed around the mean, and above 0.4 to make them more packed.
Implementations§
Trait Implementations§
Source§impl Clone for DistributionShift
impl Clone for DistributionShift
Source§fn clone(&self) -> DistributionShift
fn clone(&self) -> DistributionShift
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl ComposeSchema for DistributionShift
impl ComposeSchema for DistributionShift
Source§impl Debug for DistributionShift
impl Debug for DistributionShift
Source§impl<'de> Deserialize<'de> for DistributionShift
impl<'de> Deserialize<'de> for DistributionShift
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<E> Deserr<E> for DistributionShiftwhere
E: DeserializeError,
impl<E> Deserr<E> for DistributionShiftwhere
E: DeserializeError,
Source§fn deserialize_from_value<V: IntoValue>(
value: Value<V>,
location: ValuePointerRef<'_>,
) -> Result<Self, E>
fn deserialize_from_value<V: IntoValue>( value: Value<V>, location: ValuePointerRef<'_>, ) -> Result<Self, E>
Attempts to deserialize
Self
from the given value. Note that this method is an
implementation detail. You probably want to use the deserialize
function directly instead.Source§impl Hash for DistributionShift
impl Hash for DistributionShift
Source§impl PartialEq for DistributionShift
impl PartialEq for DistributionShift
Source§impl Serialize for DistributionShift
impl Serialize for DistributionShift
Source§impl ToSchema for DistributionShift
impl ToSchema for DistributionShift
impl Copy for DistributionShift
impl Eq for DistributionShift
impl StructuralPartialEq for DistributionShift
Auto Trait Implementations§
impl Freeze for DistributionShift
impl RefUnwindSafe for DistributionShift
impl Send for DistributionShift
impl Sync for DistributionShift
impl Unpin for DistributionShift
impl UnwindSafe for DistributionShift
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more