pub struct DataDriftDetector { /* private fields */ }Expand description
Detects drift on tabular feature matrices.
Computes both KS and PSI per feature column. The reported score is the
max over features of max(KS_D, PSI / 0.25) so a single threshold of
0.25 lines up with the standard PSI table.
Implementations§
Source§impl DataDriftDetector
impl DataDriftDetector
Sourcepub fn new(config: DataDriftConfig) -> Self
pub fn new(config: DataDriftConfig) -> Self
Construct a detector from a custom config.
Sourcepub fn detect(
&self,
baseline: &ArrayView2<'_, f64>,
current: &ArrayView2<'_, f64>,
) -> Result<DriftScore>
pub fn detect( &self, baseline: &ArrayView2<'_, f64>, current: &ArrayView2<'_, f64>, ) -> Result<DriftScore>
Compute drift between two (n_samples, n_features) matrices.
Trait Implementations§
Source§impl Clone for DataDriftDetector
impl Clone for DataDriftDetector
Source§fn clone(&self) -> DataDriftDetector
fn clone(&self) -> DataDriftDetector
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 DataDriftDetector
impl Debug for DataDriftDetector
Source§impl Default for DataDriftDetector
impl Default for DataDriftDetector
Source§fn default() -> DataDriftDetector
fn default() -> DataDriftDetector
Returns the “default value” for a type. Read more
impl Copy for DataDriftDetector
Auto Trait Implementations§
impl Freeze for DataDriftDetector
impl RefUnwindSafe for DataDriftDetector
impl Send for DataDriftDetector
impl Sync for DataDriftDetector
impl Unpin for DataDriftDetector
impl UnsafeUnpin for DataDriftDetector
impl UnwindSafe for DataDriftDetector
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