PipelineStage

Trait PipelineStage 

Source
pub trait PipelineStage: Send + Sync {
    // Required methods
    fn fit(&mut self, x: &Array2<f64>) -> Result<(), SklearsError>;
    fn transform(&self, x: &Array2<f64>) -> Result<Array2<f64>, SklearsError>;
    fn is_fitted(&self) -> bool;
    fn name(&self) -> &str;
    fn clone_stage(&self) -> Box<dyn PipelineStage>;
    fn as_any(&self) -> &dyn Any;
}
Expand description

Transform stage in the pipeline

Required Methods§

Source

fn fit(&mut self, x: &Array2<f64>) -> Result<(), SklearsError>

Fit the stage

Source

fn transform(&self, x: &Array2<f64>) -> Result<Array2<f64>, SklearsError>

Transform using the fitted stage

Source

fn is_fitted(&self) -> bool

Check if stage is fitted

Source

fn name(&self) -> &str

Get stage name

Source

fn clone_stage(&self) -> Box<dyn PipelineStage>

Clone the stage

Source

fn as_any(&self) -> &dyn Any

Get as Any for downcasting

Implementors§