feat: + builders for algorithm parameters

This commit is contained in:
Volodymyr Orlov
2020-12-23 12:29:39 -08:00
parent 74f0d9e6fb
commit dd341f4a12
17 changed files with 276 additions and 8 deletions
+9
View File
@@ -88,6 +88,15 @@ pub struct PCAParameters {
pub use_correlation_matrix: bool,
}
impl PCAParameters {
/// By default, covariance matrix is used to compute principal components.
/// Enable this flag if you want to use correlation matrix instead.
pub fn with_use_correlation_matrix(mut self, use_correlation_matrix: bool) -> Self {
self.use_correlation_matrix = use_correlation_matrix;
self
}
}
impl Default for PCAParameters {
fn default() -> Self {
PCAParameters {