Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Detection of degenerate between-class covariance matrix #201

Merged
merged 5 commits into from
Aug 20, 2022

Conversation

OkonSamuel
Copy link
Contributor

@OkonSamuel OkonSamuel commented Aug 11, 2022

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

src/lda.jl Outdated Show resolved Hide resolved
@wildart wildart changed the title fix #200 Detection of degenerate between-class covariance matrix Aug 11, 2022
@OkonSamuel OkonSamuel requested a review from wildart August 17, 2022 20:30
Copy link
Collaborator

@wildart wildart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/lda.jl Outdated Show resolved Hide resolved
@wildart wildart merged commit bf15ed0 into JuliaStats:master Aug 20, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fitting `SubspaceLDA models fails.
2 participants