Skip to content

[MRG+2] DOC examples added to the rest of sklearn/covariance classes #11732

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 85 commits into from
Mar 1, 2019

Conversation

adrinjalali
Copy link
Member

See #3846

Examples added to GraphicalLasso and GraphicalLassoCV in sklearn/covariance/graph_lasso_.py

@adrinjalali adrinjalali changed the title DOC added graphicallasso and graphicallassocv examples [WIP] DOC added graphicallasso and graphicallassocv examples Aug 3, 2018
@adrinjalali
Copy link
Member Author

adrinjalali commented Aug 4, 2018

So apparently the results depend on something other than the random seed.

The output is deterministic, as long as we don't change the setup. But my personal computer, a server I used to test, and the setup travis uses, do not agree with each other and each give a different output.

In this PR the values are the ones reported by travis, and that's why the travis tests pass. But users may get slightly different results based on their setup.

I suspect it may depend on lower lever libraries used (blas, lapack, etc), but not sure.

@adrinjalali adrinjalali force-pushed the examples/graphlasso branch from 4099adb to a2fede3 Compare August 4, 2018 09:27
@adrinjalali adrinjalali changed the title [WIP] DOC added graphicallasso and graphicallassocv examples [MRG] DOC added graphicallasso and graphicallassocv examples Aug 4, 2018
@jnothman
Copy link
Member

jnothman commented Aug 6, 2018

What kind of differences are we talking about?

@adrinjalali
Copy link
Member Author

@jnothman
the estimated negative log likelihood: 26.1847 vs 26.1927
the real negative log likelihood: 27.8393 vs 27.7033

@jnothman
Copy link
Member

jnothman commented Aug 6, 2018 via email

@adrinjalali adrinjalali changed the title [MRG] DOC added graphicallasso and graphicallassocv examples [WIP] DOC added graphicallasso and graphicallassocv examples Aug 7, 2018
@adrinjalali adrinjalali changed the title [WIP] DOC added graphicallasso and graphicallassocv examples DOC examples added to the rest of sklearn/covariance classes Sep 25, 2018
... largest_coef=.7,
... random_state=0)
>>> cov = linalg.inv(prec)
>>> d = np.sqrt(np.diag(cov))
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 normalisation deserves a comment, and ideally would be g performed with some existing scipy function

Copy link
Member Author

Choose a reason for hiding this comment

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

I found other mistakes in the example. They'd make the example kinda too long, and our docs already show this example. So changed it to be more like the other covariance examples we have, with a manually set sparse covariance matrix, if that's okay.

@adrinjalali adrinjalali changed the title DOC examples added to the rest of sklearn/covariance classes [MRG] DOC examples added to the rest of sklearn/covariance classes Oct 5, 2018
adrinjalali and others added 15 commits January 7, 2019 11:34
* Added tips for reading the code base

* Put it in contributing.rst

* Added bullet point about inheritance
* [scipy-dev] manually scramble the indices

* [scipy-dev] review comment
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.

Pending real_ -> true_

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

Let's merge.

@agramfort agramfort changed the title [MRG] DOC examples added to the rest of sklearn/covariance classes [MRG+2] DOC examples added to the rest of sklearn/covariance classes Feb 28, 2019
@jnothman jnothman merged commit 8755fa7 into scikit-learn:master Mar 1, 2019
@adrinjalali adrinjalali deleted the examples/graphlasso branch March 1, 2019 10:37
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
xhluca pushed a commit to xhluca/scikit-learn that referenced this pull request Apr 28, 2019
koenvandevelde pushed a commit to koenvandevelde/scikit-learn that referenced this pull request Jul 12, 2019
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.