Module rusty_machine::data::transforms::standardize
[−]
[src]
The Standardizing Transformer
This module contains the Standardizer
transformer.
The Standardizer
transformer is used to transform input data
so that the mean and standard deviation of each column are as
specified. This is commonly used to transform the data to have 0
mean
and a standard deviation of 1
.
Examples
use rusty_machine::data::transforms::{Transformer, Standardizer}; use rusty_machine::linalg::Matrix; // Constructs a new `Standardizer` to map to mean 0 and standard // deviation of 1. let mut transformer = Standardizer::default(); let inputs = Matrix::new(2, 2, vec![-1.0, 2.0, 1.5, 3.0]); // Transform the inputs to get output data with required mean and // standard deviation. let transformed = transformer.transform(inputs).unwrap();
Structs
Standardizer |
The Standardizer |