Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[MRG+1] Correcting length of explained_variance_ratio_, eigen solver, final PR #7632
What does this implement/fix? Explain your changes.
Attribute explained_variance_ratio_ from LinearDiscriminantAnalysis class will be of length n_components (eigen solver).
Any other comments?
This PR follows PR 7616. I mixed up my git history, so it was easier to open a new PR.
referenced this pull request
Oct 10, 2016
changed the title from
Correcting length of explained_variance_ratio_, eigen solver, final PR
[MRG+1] Correcting length of explained_variance_ratio_, eigen solver, final PR
Oct 13, 2016
Please explain why you think it should be
If I introduce this change, the tests fail:
The test fails because it's also wrong for the other solver imho.
My understanding is that the
Hum ok, I decided to call it _max_components, because it is really more explicit. This attribute is only used to store the maximum number of components of the classifier, so let's call a cat a cat.
I made it private for now. Let me know if you agree with these changes.