MultivariateStats.jl
MultivariateStats.jl copied to clipboard
Detection of degenerate between-class covariance matrix
This PR resolves #200.
It also includes a new exception called NullMatrixException which is thrown when a null matrix is detected at run-time.
Additionally, Efforts have been made to detect the case when the between-class covariance matrix is null (i.e the zero matrix) based on the input to the fit(SubspaceLDA, ...) function. For example when the number of classes/labels equals the number of samples, the resulting between-class covariance matrix is null, since in computing Hw there is only one member per class group which is then subtracted from itself when centering the data.
cc. @ablaom @wildart