FeatureSelectionPlugin

Trait FeatureSelectionPlugin 

Source
pub trait FeatureSelectionPlugin: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn version(&self) -> &str;
    fn description(&self) -> &str;
    fn metadata(&self) -> PluginMetadata;
    fn fit(
        &mut self,
        X: ArrayView2<'_, f64>,
        y: ArrayView1<'_, f64>,
    ) -> Result<()>;
    fn transform(&self, X: ArrayView2<'_, f64>) -> Result<Array2<f64>>;
    fn selected_features(&self) -> Result<Vec<usize>>;
    fn feature_scores(&self) -> Result<Array1<f64>>;
    fn is_fitted(&self) -> bool;
    fn as_any(&self) -> &dyn Any;
    fn clone_plugin(&self) -> Box<dyn FeatureSelectionPlugin>;
}
Expand description

Core trait for feature selection plugins

Required Methods§

Source

fn name(&self) -> &str

Get the plugin name

Source

fn version(&self) -> &str

Get the plugin version

Source

fn description(&self) -> &str

Get the plugin description

Source

fn metadata(&self) -> PluginMetadata

Get plugin metadata

Source

fn fit(&mut self, X: ArrayView2<'_, f64>, y: ArrayView1<'_, f64>) -> Result<()>

Fit the selector on training data

Source

fn transform(&self, X: ArrayView2<'_, f64>) -> Result<Array2<f64>>

Transform data by selecting features

Source

fn selected_features(&self) -> Result<Vec<usize>>

Get selected feature indices

Source

fn feature_scores(&self) -> Result<Array1<f64>>

Get feature scores/importances

Source

fn is_fitted(&self) -> bool

Check if the plugin is fitted

Source

fn as_any(&self) -> &dyn Any

Get plugin configuration as Any trait object

Source

fn clone_plugin(&self) -> Box<dyn FeatureSelectionPlugin>

Clone the plugin

Implementors§