diff --git a/algorithms/linfa-reduction/src/pca.rs b/algorithms/linfa-reduction/src/pca.rs index c2e31213b..87d162f7e 100644 --- a/algorithms/linfa-reduction/src/pca.rs +++ b/algorithms/linfa-reduction/src/pca.rs @@ -176,6 +176,16 @@ impl Pca { ex_var / sum_ex_var } + /// Return the components + pub fn components(&self) -> &Array2 { + &self.embedding + } + + /// Return the mean + pub fn mean(&self) -> &Array1 { + &self.mean + } + /// Return the singular values pub fn singular_values(&self) -> &Array1 { &self.sigma