PluginTransformer

Trait PluginTransformer 

Source
pub trait PluginTransformer: PluginComponent {
    // Required methods
    fn fit(
        &mut self,
        x: &ArrayView2<'_, Float>,
        y: Option<&ArrayView1<'_, Float>>,
    ) -> SklResult<()>;
    fn transform(&self, x: &ArrayView2<'_, Float>) -> SklResult<Array2<f64>>;
    fn is_fitted(&self) -> bool;
    fn get_feature_names_out(
        &self,
        input_features: Option<&[String]>,
    ) -> Vec<String>;

    // Provided method
    fn fit_transform(
        &mut self,
        x: &ArrayView2<'_, Float>,
        y: Option<&ArrayView1<'_, Float>>,
    ) -> SklResult<Array2<f64>> { ... }
}
Expand description

Plugin-based transformer

Required Methods§

Source

fn fit( &mut self, x: &ArrayView2<'_, Float>, y: Option<&ArrayView1<'_, Float>>, ) -> SklResult<()>

Fit the transformer

Source

fn transform(&self, x: &ArrayView2<'_, Float>) -> SklResult<Array2<f64>>

Transform data

Source

fn is_fitted(&self) -> bool

Check if transformer is fitted

Source

fn get_feature_names_out( &self, input_features: Option<&[String]>, ) -> Vec<String>

Get feature names output

Provided Methods§

Source

fn fit_transform( &mut self, x: &ArrayView2<'_, Float>, y: Option<&ArrayView1<'_, Float>>, ) -> SklResult<Array2<f64>>

Fit and transform in one step

Implementors§