Module rusty_machine::data::transforms::shuffle
[−]
[src]
The Shuffler
This module contains the Shuffler
transformer. Shuffler
implements the
Transformer
trait and is used to shuffle the rows of an input matrix.
You can control the random number generator used by the Shuffler
.
Examples
use rusty_machine::linalg::Matrix; use rusty_machine::data::transforms::Transformer; use rusty_machine::data::transforms::shuffle::Shuffler; // Create an input matrix that we want to shuffle let mat = Matrix::new(3, 2, vec![1.0, 2.0, 3.0, 4.0, 5.0, 6.0]); // Create a new shuffler let mut shuffler = Shuffler::default(); let shuffled_mat = shuffler.transform(mat).unwrap(); println!("{}", shuffled_mat);
Structs
Shuffler |
The |