Skip to content

[MRG] DOC covariance doctest examples #12124

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 8 commits into from
Sep 24, 2018

Conversation

adrinjalali
Copy link
Member

See #3846

Adds examples to all sklearn/covariance classes except the ones being handled in PR #11732

@adrinjalali
Copy link
Member Author

adrinjalali commented Sep 21, 2018

Removed the elliptic example, it shows the same issue as what I saw in PR #11732

@adrinjalali adrinjalali changed the title DOC covariance doctest examples [MRG] DOC covariance doctest examples Sep 21, 2018
Copy link
Member

@rth rth left a comment

Choose a reason for hiding this comment

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

Very nice, thanks @adrinjalali ! Actually the cov.location_ is not documented in the docstring, maybe add it as well?

>>> np.random.seed(0)
>>> X = np.random.multivariate_normal(mean=[0, 0],
... cov=real_cov,
... size=300)
Copy link
Contributor

@albertcthomas albertcthomas Sep 21, 2018

Choose a reason for hiding this comment

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

You put 300 here, whereas it should be 500 if you want to have the same output as for MinCovDet, see comment

@TomDLT TomDLT merged commit e8ca4cd into scikit-learn:master Sep 24, 2018
@TomDLT
Copy link
Member

TomDLT commented Sep 24, 2018

Thanks @adrinjalali !

@albertcthomas
Copy link
Contributor

albertcthomas commented Sep 24, 2018

@adrinjalali I think you might have missed my comment about the EllipticEnveloppe issue: you put n_samples=300, whereas it should be 500 if you want to have the same output as for MinCovDet.

@adrinjalali adrinjalali deleted the doc/covariance branch September 24, 2018 09:39
@adrinjalali
Copy link
Member Author

@albertcthomas I haven't missed it. The issue I report there is not the inconsistency between the two methods, and is rather just for the EllipticEnvelope. However, if the two methods are supposed to give the same results, it would mean EllipticEnvelope should also be stable if the number of samples is increased to 500. For that I need to do more tests on different systems/servers and haven't had the chance to do so yet. I'll respond to your comment on the issue #12127 once I run the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants