Skip to content

[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

Merged
merged 2 commits into from
Dec 15, 2016

Conversation

dalmia
Copy link
Contributor

@dalmia dalmia commented Nov 8, 2016

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.

@amueller
Copy link
Member

amueller commented Nov 9, 2016

check the travis error...

@dalmia
Copy link
Contributor Author

dalmia commented Nov 10, 2016

@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.
Copy link
Member

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

Copy link
Contributor Author

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.

@dalmia
Copy link
Contributor Author

dalmia commented Nov 11, 2016

@agramfort Do you feel this explains the case?

@raghavrv raghavrv added this to the 0.19 milestone Nov 14, 2016
@dalmia dalmia changed the title [WIP] DOC adding note for bessel correction [MRG] DOC adding note for bessel correction Nov 16, 2016
@@ -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
Copy link
Member

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." ?

Copy link
Member

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.

Copy link
Contributor Author

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.

@dalmia
Copy link
Contributor Author

dalmia commented Nov 29, 2016

I would be really grateful if someone could make a rebuild. Thanks.

@raghavrv
Copy link
Member

Could you rebase and forcepush. Otherwise LGTM

@raghavrv
Copy link
Member

Or even update master and simply push. (Unless you are already updated with master that should trigger a rebuild)

@raghavrv raghavrv changed the title [MRG] DOC adding note for bessel correction [MRG + 1] DOC adding note for bessel correction Nov 29, 2016
@dalmia dalmia closed this Nov 29, 2016
@dalmia dalmia reopened this Nov 29, 2016
@amueller
Copy link
Member

@agramfort what do you think? It's fine for me, I'm not entirely sure if it's a helpful addition

@dalmia
Copy link
Contributor Author

dalmia commented Dec 8, 2016

Do we have an opinion on his yet?

Copy link
Member

@jnothman jnothman left a 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
Copy link
Member

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
Copy link
Member

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.

Copy link
Contributor Author

@dalmia dalmia Dec 15, 2016

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.

@jnothman
Copy link
Member

LGTM

@jnothman jnothman merged commit 1144e3b into scikit-learn:master Dec 15, 2016
@dalmia dalmia deleted the 7699 branch December 15, 2016 22:10
sergeyf pushed a commit to sergeyf/scikit-learn that referenced this pull request Feb 28, 2017
@Przemo10 Przemo10 mentioned this pull request Mar 17, 2017
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
amueller pushed a commit that referenced this pull request Jun 21, 2017
* 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
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
…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
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
…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
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
…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
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
…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
AishwaryaRK pushed a commit to AishwaryaRK/scikit-learn that referenced this pull request Aug 29, 2017
…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
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
…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
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No Bessel correction in PCA
5 participants