Trait linfa::traits::Transformer

source ·
pub trait Transformer<R: Records, T> {
    // Required method
    fn transform(&self, x: R) -> T;
}
Expand description

Transformation algorithms

A transformer takes a dataset and transforms it into a different one. It has no concept of state and provides therefore no method to predict new data. A typical example are kernel methods.

It should be implemented for all algorithms, also for those which can be fitted.

Required Methods§

source

fn transform(&self, x: R) -> T

Implementors§

source§

impl<R: Records, T, P: TransformGuard> Transformer<R, Result<T, <P as ParamGuard>::Error>> for P
where P::Checked: Transformer<R, T>,

Performs the checking step and calls transform on the checked hyperparameters. Returns error if checking was unsuccessful.