pub struct PcaBuilder { /* private fields */ }
Expand description

Builder for Pca.

Examples

use petal_decomposition::PcaBuilder;

let x = ndarray::arr2(&[[0_f64, 0_f64], [1_f64, 1_f64]]);
let mut pca = PcaBuilder::new(1).build();
pca.fit(&x);

Implementations

Sets the number of components for PCA.

Indicates whether or not to perform mean-centering on input data. It is enabled by default. If the inputs are already centered, set centering to false. Note Pca::mean() will return an Array1 of 0’s if centering is false.

Creates an instance of Pca.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.