pub trait FeatureMap:
Send
+ Sync
+ Debug {
// Required methods
fn transform(&self, data: &Array2<f64>) -> Result<Array2<f64>, SklearsError>;
fn output_dim(&self) -> usize;
fn name(&self) -> &str;
// Provided methods
fn is_invertible(&self) -> bool { ... }
fn inverse_transform(
&self,
_features: &Array2<f64>,
) -> Result<Array2<f64>, SklearsError> { ... }
}Expand description
Feature map transformation
Required Methods§
Sourcefn transform(&self, data: &Array2<f64>) -> Result<Array2<f64>, SklearsError>
fn transform(&self, data: &Array2<f64>) -> Result<Array2<f64>, SklearsError>
Apply the feature map to input data
Sourcefn output_dim(&self) -> usize
fn output_dim(&self) -> usize
Get the output dimension
Provided Methods§
Sourcefn is_invertible(&self) -> bool
fn is_invertible(&self) -> bool
Check if the feature map is invertible
Sourcefn inverse_transform(
&self,
_features: &Array2<f64>,
) -> Result<Array2<f64>, SklearsError>
fn inverse_transform( &self, _features: &Array2<f64>, ) -> Result<Array2<f64>, SklearsError>
Inverse transform (if supported)