-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
[MRG + 1] DOC adding note for bessel correction #7843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
check the travis error... |
@amueller Please have a look now. |
@@ -120,6 +120,9 @@ class PCA(_BasePCA): | |||
Notice that this class does not support sparse input. See | |||
:class:`TruncatedSVD` for an alternative with sparse data. | |||
|
|||
No bessel correction is applied to avoid the expense of increasing the mean | |||
square error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this message cryptic without reference or explanation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add the explanation as discussed in the issue thread.
@agramfort Do you feel this explains the case? |
@@ -120,6 +120,10 @@ class PCA(_BasePCA): | |||
Notice that this class does not support sparse input. See | |||
:class:`TruncatedSVD` for an alternative with sparse data. | |||
|
|||
Although Bessel correction decreases the bias of the estimator, it also |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still pretty confusing and apropos of nothing. I'm kinda tempted not to add the note if we can't come up with a good but not too-long explanation here.
"PCA uses the maximum likelihood estimate of the eigenvalues, which does not include the Bessel correction, though in practice this should rarely make a difference." ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without a reference this indeed seems odd... +1 for your quoted wording. It feels clearer to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for being late. Could we add the link to the issue there as the discussion there makes it pretty clear? I feel we should include why we aren't including the bessel correction so as to avoid the expense of mean square error. Please let me know what you think.
I would be really grateful if someone could make a rebuild. Thanks. |
Could you rebase and forcepush. Otherwise LGTM |
Or even update master and simply push. (Unless you are already updated with master that should trigger a rebuild) |
@agramfort what do you think? It's fine for me, I'm not entirely sure if it's a helpful addition |
Do we have an opinion on his yet? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise this is fine by me
@@ -120,6 +120,10 @@ class PCA(_BasePCA): | |||
Notice that this class does not support sparse input. See | |||
:class:`TruncatedSVD` for an alternative with sparse data. | |||
|
|||
PCA uses the maximum likelihood estimate of the eigenvalues, which does not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fairly minor, so create a Notes section below where this can be included.
@@ -120,6 +120,10 @@ class PCA(_BasePCA): | |||
Notice that this class does not support sparse input. See | |||
:class:`TruncatedSVD` for an alternative with sparse data. | |||
|
|||
PCA uses the maximum likelihood estimate of the eigenvalues, which does not | |||
include the Bessel correction, though in practice this should rarely make a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line length should be < 80.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked. The line length is below 80. Making the above change.
LGTM |
* fix pca explained_variance_ * fix fit_transform * fix test_whitening * fix IncrementalPCA * uncomment the test * improve test * make CI green * revert #7843 and add what's new * fix what's new
…t-learn#9105) * fix pca explained_variance_ * fix fit_transform * fix test_whitening * fix IncrementalPCA * uncomment the test * improve test * make CI green * revert scikit-learn#7843 and add what's new * fix what's new
…t-learn#9105) * fix pca explained_variance_ * fix fit_transform * fix test_whitening * fix IncrementalPCA * uncomment the test * improve test * make CI green * revert scikit-learn#7843 and add what's new * fix what's new
…t-learn#9105) * fix pca explained_variance_ * fix fit_transform * fix test_whitening * fix IncrementalPCA * uncomment the test * improve test * make CI green * revert scikit-learn#7843 and add what's new * fix what's new
…t-learn#9105) * fix pca explained_variance_ * fix fit_transform * fix test_whitening * fix IncrementalPCA * uncomment the test * improve test * make CI green * revert scikit-learn#7843 and add what's new * fix what's new
…t-learn#9105) * fix pca explained_variance_ * fix fit_transform * fix test_whitening * fix IncrementalPCA * uncomment the test * improve test * make CI green * revert scikit-learn#7843 and add what's new * fix what's new
…t-learn#9105) * fix pca explained_variance_ * fix fit_transform * fix test_whitening * fix IncrementalPCA * uncomment the test * improve test * make CI green * revert scikit-learn#7843 and add what's new * fix what's new
…t-learn#9105) * fix pca explained_variance_ * fix fit_transform * fix test_whitening * fix IncrementalPCA * uncomment the test * improve test * make CI green * revert scikit-learn#7843 and add what's new * fix what's new
Reference Issue
Fixes #7699
What does this implement/fix? Explain your changes.
Added a note to the docstring explaining the reason for not including bessel correction.