Skip to content

DOC Adds example for empirical_covariance#16229

Merged
thomasjpfan merged 2 commits intoscikit-learn:masterfrom
fraboeni:example_adding_branch
Feb 4, 2020
Merged

DOC Adds example for empirical_covariance#16229
thomasjpfan merged 2 commits intoscikit-learn:masterfrom
fraboeni:example_adding_branch

Conversation

@fraboeni
Copy link
Copy Markdown
Contributor

with @magda-zielinska

Reference Issues/PRs

#3846

What does this implement/fix? Explain your changes.

Adds an example to the _empirical_covariance function

Copy link
Copy Markdown
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

LGTM. Only some alignment issue.

--------
>>> from sklearn.covariance import empirical_covariance
>>> X = [[1,1,1],[1,1,1],[1,1,1],
... [0,0,0],[0,0,0],[0,0,0]]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
... [0,0,0],[0,0,0],[0,0,0]]
... [0,0,0],[0,0,0],[0,0,0]]

... [0,0,0],[0,0,0],[0,0,0]]
>>> empirical_covariance(X)
array([[0.25, 0.25, 0.25],
[0.25, 0.25, 0.25],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
[0.25, 0.25, 0.25],
[0.25, 0.25, 0.25],

>>> empirical_covariance(X)
array([[0.25, 0.25, 0.25],
[0.25, 0.25, 0.25],
[0.25, 0.25, 0.25]])
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
[0.25, 0.25, 0.25]])
[0.25, 0.25, 0.25]])

array([[0.25, 0.25, 0.25],
[0.25, 0.25, 0.25],
[0.25, 0.25, 0.25]])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change

@cmarmo
Copy link
Copy Markdown
Contributor

cmarmo commented Feb 4, 2020

Hi @fraboeni, one approval already, and the failing checks have nothing to do with your modifications. Do you think you will find some time to finalize this? Thanks for your time!

@thomasjpfan thomasjpfan changed the title [MRG] #3846 Added an example for _empirical_covariance [MRG] Adds example for empirical_covariance Feb 4, 2020
Copy link
Copy Markdown
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @fraboeni !

@thomasjpfan thomasjpfan changed the title [MRG] Adds example for empirical_covariance DOC Adds example for empirical_covariance Feb 4, 2020
@thomasjpfan thomasjpfan merged commit 1070355 into scikit-learn:master Feb 4, 2020
thomasjpfan pushed a commit to thomasjpfan/scikit-learn that referenced this pull request Feb 22, 2020
panpiort8 pushed a commit to panpiort8/scikit-learn that referenced this pull request Mar 3, 2020
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.

4 participants