DOC Adds example to OAS#16681
Conversation
adrinjalali
left a comment
There was a problem hiding this comment.
Thanks for the PR @marenwestermann
| >>> oas = OAS().fit(X) | ||
| >>> oas.covariance_ | ||
| array([[0.7533..., 0.2763...], | ||
| [0.2763..., 0.3964...]]) |
There was a problem hiding this comment.
I think adding a few spaces here to align the brackets with the previous line would make it look nicer.
There was a problem hiding this comment.
I agree. Fixed it.
| [0.2763..., 0.3964...]]) | ||
| >>> oas.precision_ | ||
| array([[ 1.7833..., -1.2431... ], | ||
| [-1.2431..., 3.3889...]]) |
| ... cov=real_cov, | ||
| ... size=500) |
There was a problem hiding this comment.
I corrected the alignment here, too.
There was a problem hiding this comment.
But the correct alignment here is for cov to be aligned with mean, not the bracket, since it's not a part of the list represented by the brackets.
There was a problem hiding this comment.
Oh, true! I addressed it.
adrinjalali
left a comment
There was a problem hiding this comment.
LGTM, thanks @marenwestermann
thomasjpfan
left a comment
There was a problem hiding this comment.
@marenwestermann I see this is your first time contributing, welcome!
LGTM
Reference Issues/PRs
Towards #3846
What does this implement/fix? Explain your changes.
Fixes missing examples in covariance.OAS documentation in #3846.
It is almost the same as covariance.ShrunkCovariance.
ping @adrinjalali