You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 16, 2021. It is now read-only.
After looking at the sklearn code and seeing the huge number of possible places that CovOption can come into play, I'd like to propose a redesign of the way we handle various CovOption values.
The basic idea is that this will let us expand the types of CovOption values that we have without changing the match statements, making our API more resilient and allowing other library authors to pass their own values without necessarily needing to have their changes approved and incorporated upstream.
Trait
Create a trait that encompasses the few methods that involve CovOption. This should be something like:
pubtraitCovOption{/// Initializes the values for GMM, replaces gmm.rs:81fninitial_values(inputs:&Matrix<f64>) -> Matrix<f64>;/// Compute the covariance, replaces gmm.rs:334fncompute_cov(diff:Matrix<f64>,weight:f64);}
Structs
Create a struct for each variant of our current enum. The code for this should be pretty obvious so I won't repeat it here.
GaussianMixtureModel
Similar to now, it will take a struct Swhere S: CovOption.