pub struct QueryDriftDetector { /* private fields */ }Expand description
Detects shift in query distribution via k-means cluster assignment KL.
Implementations§
Source§impl QueryDriftDetector
impl QueryDriftDetector
Sourcepub fn new(config: QueryDriftConfig) -> Self
pub fn new(config: QueryDriftConfig) -> Self
Construct a detector from a custom config.
Sourcepub fn detect(
&self,
baseline: &ArrayView2<'_, f32>,
current: &ArrayView2<'_, f32>,
) -> Result<DriftScore>
pub fn detect( &self, baseline: &ArrayView2<'_, f32>, current: &ArrayView2<'_, f32>, ) -> Result<DriftScore>
Detect drift between two (n_samples, dim) query embedding matrices.
Trait Implementations§
Source§impl Clone for QueryDriftDetector
impl Clone for QueryDriftDetector
Source§fn clone(&self) -> QueryDriftDetector
fn clone(&self) -> QueryDriftDetector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryDriftDetector
impl Debug for QueryDriftDetector
Source§impl Default for QueryDriftDetector
impl Default for QueryDriftDetector
Source§fn default() -> QueryDriftDetector
fn default() -> QueryDriftDetector
Returns the “default value” for a type. Read more
impl Copy for QueryDriftDetector
Auto Trait Implementations§
impl Freeze for QueryDriftDetector
impl RefUnwindSafe for QueryDriftDetector
impl Send for QueryDriftDetector
impl Sync for QueryDriftDetector
impl Unpin for QueryDriftDetector
impl UnsafeUnpin for QueryDriftDetector
impl UnwindSafe for QueryDriftDetector
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<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