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§
Sourcefn fit(
&mut self,
x: &ArrayView2<'_, Float>,
y: Option<&ArrayView1<'_, Float>>,
) -> SklResult<()>
fn fit( &mut self, x: &ArrayView2<'_, Float>, y: Option<&ArrayView1<'_, Float>>, ) -> SklResult<()>
Fit the transformer
Provided Methods§
Sourcefn fit_transform(
&mut self,
x: &ArrayView2<'_, Float>,
y: Option<&ArrayView1<'_, Float>>,
) -> SklResult<Array2<f64>>
fn fit_transform( &mut self, x: &ArrayView2<'_, Float>, y: Option<&ArrayView1<'_, Float>>, ) -> SklResult<Array2<f64>>
Fit and transform in one step