AtheMathmo / rusty-machine

Machine Learning library for Rust
https://crates.io/crates/rusty-machine/
MIT License
1.25k stars 152 forks source link

GMM panics if the covariance inverse fails #143

Closed AtheMathmo closed 8 years ago

AtheMathmo commented 8 years ago

In the membership_weights function we compute the inverse of the covariance. This returns a Result which we call expect on - leading to a panic if the inverse could not be computed.

We should instead make the membership_weights function return a LearningResult which we try! to unwrap in the train function. To do this we'll need to map the rulinalg error returned by the inverse function to a rusty-machine error.