-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG+1] Ledoit-Wolf behavior explanation #9500
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
[MRG+1] Ledoit-Wolf behavior explanation #9500
Conversation
this seems ok to me, but I'm not an expert in this one. ping @ogrisel, maybe @agramfort ? |
doc/modules/covariance.rst
Outdated
the case. When the population covariance is a multiple of the | ||
identity, the LW shrinkage estimate becomes close or equal to 1. | ||
This indicates that the optimal estimate of the covariance matrix in | ||
the LW sense of the is multiple of the identity. Since the population |
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.
There is a problem with this sentence. Either part of it is missing, or there is a "of the" that needs to be deleted.
…into ledoit_wolf_explaination merge upstream changes into current branch
…learn into ledoit_wolf_explaination
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 know very little about this. Is the issue so prevalent as to deserve such prominent and repeated alerts? We tend to keep things brief in docstrings. If it remains in the docstring it should be in Notes below.
Even in the user guide, I wonder if it should be a .. note::
.
Thanks
@jnothman That makes much more sense. I'd imagine the behavior would only arise in a handful of cases, so there's probably no need for anything more than a note in the documentation |
…into ledoit_wolf_explaination merge upstream changes
doc/modules/covariance.rst
Outdated
@@ -153,13 +170,13 @@ object to the same sample. | |||
an example on how to fit an :class:`OAS` object | |||
to data. | |||
|
|||
* See :ref:`sphx_glr_auto_examples_covariance_plot_lw_vs_oas.py` to visualize the | |||
* See :ref:`sphx_glr_auto_examples_covariance_plot_Ledoit-Wolf_vs_oas.py` to visualize the |
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.
You've broken these links...
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 LGTM
…into ledoit_wolf_explaination pull in upstream changes
Made the changes. Is there anything else I should do for |
I think we can merge this with one review. Thanks |
* DOC add explaination of unexpected behavior to ledoit-wolf functions and class * DOC add explaination of unexpected ledoit-wolf behavior to module documentation * fix line that's longer than 80 chars, pep8 issue * fix documentation changes to Ledoit_Wolf behavior explaination * change bahavior explanation to a note in documentation * remove unexpected behavior explanation from docstrings * fix broken links in docs
* tag '0.19.1': (117 commits) TST Improve SelectFromModel tests (scikit-learn#9733) Name in what's new [MRG+1] Raise error when SparseSeries is passed into classification metrics (scikit-learn#7373) Fix LogisticRegressionCV default solver value in docstring (scikit-learn#9962) [MRG+1] DOC fix sign in GBRT mathematical formulation (scikit-learn#9885) [MRG+1] DOC fix sign in GBRT mathematical formulation (scikit-learn#9885) DOC fix a typo (scikit-learn#9892) [MRG+1] Ledoit-Wolf behavior explanation (scikit-learn#9500) [MRG+1] Fix typos in documentation (scikit-learn#9878) DOC: Use setattr(self, ...) instead of self.setattr(...) (scikit-learn#9866) DOC Removed a duplicate occurrence of a word in 'sklearn.neighbors.KNeighborsRegressor' docs (scikit-learn#9862) FIX docstring of negative_outlier_factor_ in LOF (scikit-learn#9809) [MRG+1] Fix scikit-learn#9743: Adding parameter information to docstring. (scikit-learn#9757) DOC: fix docstring of Imputer.fit (scikit-learn#9769) various minor spelling tweaks (scikit-learn#9783) MAINT comment on apparent inconsistency [MRG+1] DOC fix headers level in cross_validation.rst (scikit-learn#9679) Fix mailmap format (scikit-learn#9620) DOC Fix typos (scikit-learn#9577) Typo (scikit-learn#9571) ...
* releases: (117 commits) TST Improve SelectFromModel tests (scikit-learn#9733) Name in what's new [MRG+1] Raise error when SparseSeries is passed into classification metrics (scikit-learn#7373) Fix LogisticRegressionCV default solver value in docstring (scikit-learn#9962) [MRG+1] DOC fix sign in GBRT mathematical formulation (scikit-learn#9885) [MRG+1] DOC fix sign in GBRT mathematical formulation (scikit-learn#9885) DOC fix a typo (scikit-learn#9892) [MRG+1] Ledoit-Wolf behavior explanation (scikit-learn#9500) [MRG+1] Fix typos in documentation (scikit-learn#9878) DOC: Use setattr(self, ...) instead of self.setattr(...) (scikit-learn#9866) DOC Removed a duplicate occurrence of a word in 'sklearn.neighbors.KNeighborsRegressor' docs (scikit-learn#9862) FIX docstring of negative_outlier_factor_ in LOF (scikit-learn#9809) [MRG+1] Fix scikit-learn#9743: Adding parameter information to docstring. (scikit-learn#9757) DOC: fix docstring of Imputer.fit (scikit-learn#9769) various minor spelling tweaks (scikit-learn#9783) MAINT comment on apparent inconsistency [MRG+1] DOC fix headers level in cross_validation.rst (scikit-learn#9679) Fix mailmap format (scikit-learn#9620) DOC Fix typos (scikit-learn#9577) Typo (scikit-learn#9571) ...
* dfsg: (117 commits) TST Improve SelectFromModel tests (scikit-learn#9733) Name in what's new [MRG+1] Raise error when SparseSeries is passed into classification metrics (scikit-learn#7373) Fix LogisticRegressionCV default solver value in docstring (scikit-learn#9962) [MRG+1] DOC fix sign in GBRT mathematical formulation (scikit-learn#9885) [MRG+1] DOC fix sign in GBRT mathematical formulation (scikit-learn#9885) DOC fix a typo (scikit-learn#9892) [MRG+1] Ledoit-Wolf behavior explanation (scikit-learn#9500) [MRG+1] Fix typos in documentation (scikit-learn#9878) DOC: Use setattr(self, ...) instead of self.setattr(...) (scikit-learn#9866) DOC Removed a duplicate occurrence of a word in 'sklearn.neighbors.KNeighborsRegressor' docs (scikit-learn#9862) FIX docstring of negative_outlier_factor_ in LOF (scikit-learn#9809) [MRG+1] Fix scikit-learn#9743: Adding parameter information to docstring. (scikit-learn#9757) DOC: fix docstring of Imputer.fit (scikit-learn#9769) various minor spelling tweaks (scikit-learn#9783) MAINT comment on apparent inconsistency [MRG+1] DOC fix headers level in cross_validation.rst (scikit-learn#9679) Fix mailmap format (scikit-learn#9620) DOC Fix typos (scikit-learn#9577) Typo (scikit-learn#9571) ...
* DOC add explaination of unexpected behavior to ledoit-wolf functions and class * DOC add explaination of unexpected ledoit-wolf behavior to module documentation * fix line that's longer than 80 chars, pep8 issue * fix documentation changes to Ledoit_Wolf behavior explaination * change bahavior explanation to a note in documentation * remove unexpected behavior explanation from docstrings * fix broken links in docs
* DOC add explaination of unexpected behavior to ledoit-wolf functions and class * DOC add explaination of unexpected ledoit-wolf behavior to module documentation * fix line that's longer than 80 chars, pep8 issue * fix documentation changes to Ledoit_Wolf behavior explaination * change bahavior explanation to a note in documentation * remove unexpected behavior explanation from docstrings * fix broken links in docs
Reference Issue
Fixes Issue #6482: Explanation of unexpected but correct behavior of Ledoit-Wolf covariance estimate. Originally raised by @clamus.
What does this implement/fix? Explain your changes.
The fix adds a brief explanation of some unexpected (but correct) behavior in implementations of the Ledoit-Wolf covariance estimator. The changes are to docstrings and a section of the module documenation—no implementation changes.
The estimator determines the optimal amount of shrinkage towards some multiple identity matrix for a given dataset. If the empirical covariance matrix is already a multiple of the covariance matrix, the estimator will interpret the result as having a high degree of shrinkage. This behavior has no effect on the resulting matrix.
Any other comments?
Sorry for the typo in the branch name. Looking forward to working with you in the Fall Professor @amueller!