pub struct MixedTypeFeatureExtractor {
pub feature_types: Vec<FeatureType>,
pub normalize_numerical: bool,
pub handle_missing_values: bool,
pub missing_value_strategy: MissingValueStrategy,
pub encoding_strategy: CategoricalEncoding,
pub include_interaction_features: bool,
pub random_state: Option<u64>,
}Expand description
Mixed-type feature extractor for handling heterogeneous data
This extractor can handle different types of features (numerical, categorical, binary, ordinal) and apply appropriate transformations to each type, creating a unified feature matrix.
Fields§
§feature_types: Vec<FeatureType>Types of features for each column
normalize_numerical: boolWhether to normalize numerical features
handle_missing_values: boolWhether to handle missing values
missing_value_strategy: MissingValueStrategyStrategy for handling missing values
encoding_strategy: CategoricalEncodingCategorical encoding strategy
include_interaction_features: boolWhether to include interaction features
random_state: Option<u64>Random state for reproducible results
Implementations§
Source§impl MixedTypeFeatureExtractor
impl MixedTypeFeatureExtractor
Sourcepub fn feature_types(self, types: Vec<FeatureType>) -> Self
pub fn feature_types(self, types: Vec<FeatureType>) -> Self
Set feature types for each column
Sourcepub fn normalize_numerical(self, normalize: bool) -> Self
pub fn normalize_numerical(self, normalize: bool) -> Self
Set whether to normalize numerical features
Sourcepub fn handle_missing_values(self, handle: bool) -> Self
pub fn handle_missing_values(self, handle: bool) -> Self
Set whether to handle missing values
Sourcepub fn missing_value_strategy(self, strategy: MissingValueStrategy) -> Self
pub fn missing_value_strategy(self, strategy: MissingValueStrategy) -> Self
Set missing value strategy
Sourcepub fn encoding_strategy(self, strategy: CategoricalEncoding) -> Self
pub fn encoding_strategy(self, strategy: CategoricalEncoding) -> Self
Set categorical encoding strategy
Sourcepub fn include_interaction_features(self, include: bool) -> Self
pub fn include_interaction_features(self, include: bool) -> Self
Set whether to include interaction features
Sourcepub fn random_state(self, seed: u64) -> Self
pub fn random_state(self, seed: u64) -> Self
Set random state
Trait Implementations§
Source§impl Clone for MixedTypeFeatureExtractor
impl Clone for MixedTypeFeatureExtractor
Source§impl Debug for MixedTypeFeatureExtractor
impl Debug for MixedTypeFeatureExtractor
Source§impl Default for MixedTypeFeatureExtractor
impl Default for MixedTypeFeatureExtractor
Source§impl Estimator for MixedTypeFeatureExtractor
impl Estimator for MixedTypeFeatureExtractor
Source§type Error = SklearsError
type Error = SklearsError
Error type for the estimator
Source§fn validate_config(&self) -> Result<(), SklearsError>
fn validate_config(&self) -> Result<(), SklearsError>
Validate estimator configuration with detailed error context
Source§fn check_compatibility(
&self,
n_samples: usize,
n_features: usize,
) -> Result<(), SklearsError>
fn check_compatibility( &self, n_samples: usize, n_features: usize, ) -> Result<(), SklearsError>
Check if estimator is compatible with given data dimensions
Source§fn metadata(&self) -> EstimatorMetadata
fn metadata(&self) -> EstimatorMetadata
Get estimator metadata
Source§impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ()> for MixedTypeFeatureExtractor
impl Fit<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ()> for MixedTypeFeatureExtractor
Source§type Fitted = FittedMixedTypeFeatureExtractor
type Fitted = FittedMixedTypeFeatureExtractor
The fitted model type
Source§fn fit(self, X: &Array2<f64>, _y: &()) -> SklResult<Self::Fitted>
fn fit(self, X: &Array2<f64>, _y: &()) -> SklResult<Self::Fitted>
Fit the model to the provided data with validation
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,
Fit with custom validation and early stopping
Auto Trait Implementations§
impl Freeze for MixedTypeFeatureExtractor
impl RefUnwindSafe for MixedTypeFeatureExtractor
impl Send for MixedTypeFeatureExtractor
impl Sync for MixedTypeFeatureExtractor
impl Unpin for MixedTypeFeatureExtractor
impl UnsafeUnpin for MixedTypeFeatureExtractor
impl UnwindSafe for MixedTypeFeatureExtractor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> StableApi for Twhere
T: Estimator,
impl<T> StableApi for Twhere
T: Estimator,
Source§const STABLE_SINCE: &'static str = "0.1.0"
const STABLE_SINCE: &'static str = "0.1.0"
API version this type was stabilized in
Source§const HAS_EXPERIMENTAL_FEATURES: bool = false
const HAS_EXPERIMENTAL_FEATURES: bool = false
Whether this API has any experimental features