pub struct OutlierTransformer<State = Untrained> { /* private fields */ }Expand description
Outlier transformer for handling extreme values through transformation
Implementations§
Source§impl OutlierTransformer<Untrained>
impl OutlierTransformer<Untrained>
Sourcepub fn box_cox_fixed(lambda: Float) -> Self
pub fn box_cox_fixed(lambda: Float) -> Self
Create a Box-Cox transformation with fixed lambda
Sourcepub fn quantile_uniform(n_quantiles: usize) -> Self
pub fn quantile_uniform(n_quantiles: usize) -> Self
Create a quantile transformation to uniform distribution
Sourcepub fn quantile_normal(n_quantiles: usize) -> Self
pub fn quantile_normal(n_quantiles: usize) -> Self
Create a quantile transformation to normal distribution
Sourcepub fn robust_scale() -> Self
pub fn robust_scale() -> Self
Create a robust scaling transformation
Sourcepub fn interpolate(threshold: Float, detection_method: &str) -> Self
pub fn interpolate(threshold: Float, detection_method: &str) -> Self
Create an interpolation transformation
Sourcepub fn trim(lower_percentile: Float, upper_percentile: Float) -> Self
pub fn trim(lower_percentile: Float, upper_percentile: Float) -> Self
Create a trimming transformation
Sourcepub fn method(self, method: OutlierTransformationMethod) -> Self
pub fn method(self, method: OutlierTransformationMethod) -> Self
Set the transformation method
Sourcepub fn outlier_threshold(self, threshold: Float) -> Self
pub fn outlier_threshold(self, threshold: Float) -> Self
Set the outlier detection threshold
Sourcepub fn detection_method(self, method: String) -> Self
pub fn detection_method(self, method: String) -> Self
Set the outlier detection method
Sourcepub fn lower_percentile(self, percentile: Float) -> Self
pub fn lower_percentile(self, percentile: Float) -> Self
Set the lower percentile for trimming
Sourcepub fn upper_percentile(self, percentile: Float) -> Self
pub fn upper_percentile(self, percentile: Float) -> Self
Set the upper percentile for trimming
Sourcepub fn smoothing_window(self, window: usize) -> Self
pub fn smoothing_window(self, window: usize) -> Self
Set the smoothing window size
Sourcepub fn n_quantiles(self, n_quantiles: usize) -> Self
pub fn n_quantiles(self, n_quantiles: usize) -> Self
Set the number of quantiles
Sourcepub fn handle_negatives(self, handle: bool) -> Self
pub fn handle_negatives(self, handle: bool) -> Self
Set whether to handle negative values
Sourcepub fn log_epsilon(self, epsilon: Float) -> Self
pub fn log_epsilon(self, epsilon: Float) -> Self
Set the epsilon for log transformations
Sourcepub fn feature_wise(self, feature_wise: bool) -> Self
pub fn feature_wise(self, feature_wise: bool) -> Self
Set whether to apply transformations feature-wise
Source§impl OutlierTransformer<Trained>
impl OutlierTransformer<Trained>
Sourcepub fn n_features_in(&self) -> Option<usize>
pub fn n_features_in(&self) -> Option<usize>
Get the number of features seen during fit
Sourcepub fn transformation_params(&self) -> Option<&TransformationParameters>
pub fn transformation_params(&self) -> Option<&TransformationParameters>
Get transformation parameters
Sourcepub fn feature_stats(
&self,
feature_idx: usize,
) -> Option<&FeatureTransformationParams>
pub fn feature_stats( &self, feature_idx: usize, ) -> Option<&FeatureTransformationParams>
Get transformation statistics for a specific feature
Trait Implementations§
Source§impl<State: Clone> Clone for OutlierTransformer<State>
impl<State: Clone> Clone for OutlierTransformer<State>
Source§fn clone(&self) -> OutlierTransformer<State>
fn clone(&self) -> OutlierTransformer<State>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<State: Debug> Debug for OutlierTransformer<State>
impl<State: Debug> Debug for OutlierTransformer<State>
Source§impl Default for OutlierTransformer<Untrained>
impl Default for OutlierTransformer<Untrained>
Source§impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ()> for OutlierTransformer<Untrained>
impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ()> for OutlierTransformer<Untrained>
Source§type Fitted = OutlierTransformer<Trained>
type Fitted = OutlierTransformer<Trained>
Source§fn fit(self, x: &Array2<Float>, _y: &()) -> Result<Self::Fitted>
fn fit(self, x: &Array2<Float>, _y: &()) -> Result<Self::Fitted>
Source§fn fit_with_validation(
self,
x: &X,
y: &Y,
_x_val: Option<&X>,
_y_val: Option<&Y>,
) -> Result<(Self::Fitted, FitMetrics), SklearsError>where
Self: Sized,
fn fit_with_validation(
self,
x: &X,
y: &Y,
_x_val: Option<&X>,
_y_val: Option<&Y>,
) -> Result<(Self::Fitted, FitMetrics), SklearsError>where
Self: Sized,
Auto Trait Implementations§
impl<State> Freeze for OutlierTransformer<State>
impl<State> RefUnwindSafe for OutlierTransformer<State>where
State: RefUnwindSafe,
impl<State> Send for OutlierTransformer<State>where
State: Send,
impl<State> Sync for OutlierTransformer<State>where
State: Sync,
impl<State> Unpin for OutlierTransformer<State>where
State: Unpin,
impl<State> UnwindSafe for OutlierTransformer<State>where
State: UnwindSafe,
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
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>
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>
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