pub struct RobustPreprocessor<State = Untrained> { /* private fields */ }Expand description
Comprehensive robust preprocessor
Implementations§
Source§impl RobustPreprocessor<Untrained>
impl RobustPreprocessor<Untrained>
Sourcepub fn conservative() -> Self
pub fn conservative() -> Self
Create a conservative robust preprocessor
Sourcepub fn aggressive() -> Self
pub fn aggressive() -> Self
Create an aggressive robust preprocessor
Sourcepub fn config(self, config: RobustPreprocessorConfig) -> Self
pub fn config(self, config: RobustPreprocessorConfig) -> Self
Set the configuration
Sourcepub fn outlier_detection(self, enable: bool) -> Self
pub fn outlier_detection(self, enable: bool) -> Self
Enable or disable outlier detection
Sourcepub fn outlier_transformation(self, enable: bool) -> Self
pub fn outlier_transformation(self, enable: bool) -> Self
Enable or disable outlier transformation
Sourcepub fn outlier_imputation(self, enable: bool) -> Self
pub fn outlier_imputation(self, enable: bool) -> Self
Enable or disable outlier-aware imputation
Sourcepub fn robust_scaling(self, enable: bool) -> Self
pub fn robust_scaling(self, enable: bool) -> Self
Enable or disable robust scaling
Sourcepub fn detection_method(self, method: OutlierDetectionMethod) -> Self
pub fn detection_method(self, method: OutlierDetectionMethod) -> Self
Set the outlier detection method
Sourcepub fn transformation_method(self, method: OutlierTransformationMethod) -> Self
pub fn transformation_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 threshold
Sourcepub fn adaptive_thresholds(self, enable: bool) -> Self
pub fn adaptive_thresholds(self, enable: bool) -> Self
Enable adaptive thresholds
Sourcepub fn contamination_rate(self, rate: Float) -> Self
pub fn contamination_rate(self, rate: Float) -> Self
Set the contamination rate
Sourcepub fn quantile_range(self, range: (Float, Float)) -> Self
pub fn quantile_range(self, range: (Float, Float)) -> Self
Set the quantile range for robust scaling
Sourcepub fn with_centering(self, center: bool) -> Self
pub fn with_centering(self, center: bool) -> Self
Set whether to center data in robust scaling
Sourcepub fn with_scaling(self, scale: bool) -> Self
pub fn with_scaling(self, scale: bool) -> Self
Set whether to scale data in robust scaling
Source§impl RobustPreprocessor<Trained>
impl RobustPreprocessor<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 preprocessing_stats(&self) -> Option<&RobustPreprocessingStats>
pub fn preprocessing_stats(&self) -> Option<&RobustPreprocessingStats>
Get preprocessing statistics
Sourcepub fn outlier_detector(&self) -> Option<&OutlierDetector<Trained>>
pub fn outlier_detector(&self) -> Option<&OutlierDetector<Trained>>
Get outlier detector (if enabled)
Sourcepub fn outlier_transformer(&self) -> Option<&OutlierTransformer<Trained>>
pub fn outlier_transformer(&self) -> Option<&OutlierTransformer<Trained>>
Get outlier transformer (if enabled)
Sourcepub fn outlier_imputer(&self) -> Option<&OutlierAwareImputer>
pub fn outlier_imputer(&self) -> Option<&OutlierAwareImputer>
Get outlier-aware imputer (if enabled)
Sourcepub fn robust_scaler(&self) -> Option<&RobustScaler>
pub fn robust_scaler(&self) -> Option<&RobustScaler>
Get robust scaler (if enabled)
Sourcepub fn preprocessing_report(&self) -> Result<String>
pub fn preprocessing_report(&self) -> Result<String>
Generate a comprehensive preprocessing report
Sourcepub fn is_effective(&self) -> bool
pub fn is_effective(&self) -> bool
Check if the preprocessing was effective
Sourcepub fn get_recommendations(&self) -> Vec<String>
pub fn get_recommendations(&self) -> Vec<String>
Get recommendations for improving preprocessing
Trait Implementations§
Source§impl<State: Clone> Clone for RobustPreprocessor<State>
impl<State: Clone> Clone for RobustPreprocessor<State>
Source§fn clone(&self) -> RobustPreprocessor<State>
fn clone(&self) -> RobustPreprocessor<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 RobustPreprocessor<State>
impl<State: Debug> Debug for RobustPreprocessor<State>
Source§impl Default for RobustPreprocessor<Untrained>
impl Default for RobustPreprocessor<Untrained>
Source§impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ()> for RobustPreprocessor<Untrained>
impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ()> for RobustPreprocessor<Untrained>
Source§type Fitted = RobustPreprocessor<Trained>
type Fitted = RobustPreprocessor<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 RobustPreprocessor<State>
impl<State> RefUnwindSafe for RobustPreprocessor<State>where
State: RefUnwindSafe,
impl<State> Send for RobustPreprocessor<State>where
State: Send,
impl<State> Sync for RobustPreprocessor<State>where
State: Sync,
impl<State> Unpin for RobustPreprocessor<State>where
State: Unpin,
impl<State> UnwindSafe for RobustPreprocessor<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