Expand description

The Min-Max transformer

This module contains the MinMaxScaler transformer.

The MinMaxScaler transformer is used to transform input data so that the minimum and maximum of each column are as specified. This is commonly used to transform the data to have a minimum of 0 and a maximum of 1.

Examples

use rusty_machine::data::transforms::{Transformer, TransformFitter, MinMaxFitter};
use rusty_machine::linalg::Matrix;

let inputs = Matrix::new(2, 2, vec![-1.0, 2.0, 1.5, 3.0]);

// Constructs a new `MinMaxScaler` to map minimum to 0 and maximum
// to 1.
let mut transformer = MinMaxFitter::default().fit(&inputs).unwrap();


// Transform the inputs to get output data with required minimum
// and maximum.
let transformed = transformer.transform(inputs).unwrap();

Structs

A builder used to construct a MinMaxScaler
The MinMaxScaler