-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
DOC: add a tutorial about scipy.stats.qmc #13487
Conversation
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.
Very clear documentations ! I learnt something, thank you :)
Thanks 😃 ! I am adding a few links to the doc and will unmark as draft. |
Awesome! Thanks for help @ArtOwen. In case it's helpful, you can always access the latest version of the rendered html under the CI checks:
Subclassing tends to be fragile, and I hadn't realized you wanted to support that. It's fine, but it would be good to add some tests (I don't think there are any) so we don't inadvertently break end user subclasses.
The format looks great. It's easy to follow, and starting with the general principles and then code examples is a good idea. It looks like it's in pretty good shape already. If you want to make it longer, we can break it out into a separate page. |
I am actually not that sure we want to advertise this. As for the tests, right now there are just doctests you're right. TBH I am not sure how to properly test an ABC. Shall I just copy the doctest in the tests? So just do a basic subclass and test it with the
Could almost be a complete module and not a submodule anymore 😉 |
I think it's fine to keep. And yes, just copying into the tests - create a subclass, and call some methods on it. Here is how it's done for distribution subclasses: https://github.com/scipy/scipy/blob/master/scipy/stats/tests/test_distributions.py#L4680 |
0aea2a3
to
c837176
Compare
Thanks for the email summary @tupui. I thought it was still waiting for further changes. It looks in good shape already. Shall I review and merge now, and leave possible improvements to a next PR? |
I am finished on my side. I think there is enough information and we can always add specifics if @ArtOwen has more input in the future 😃 |
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 just had a quick look and left two comments.
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.
This looks good overall, thanks @tupui. I left some comments for parts I wasn't sure about, and pushed some textual fixes.
Thanks for the review! |
doc/source/tutorial/stats.rst
Outdated
|
||
f(\mathbf{x}) = \left( \sum_{j=1}^{5}x_j \right)^2, | ||
|
||
which has a known mean value, :math:`\mu = 5/3+5(5-1)/4`. Using MC sampling, we |
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.
what kind of distribution do you assume for the x_i?
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.
A uniform distribution. Usually when doing convergence analysis you only use uniform distribution as to not bias the results.
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.
LGTM now, merging. Thanks @tupui! And thanks to all the reviewers as well.
Thank you @rgommers, and thank you everyone for reviewing 😃 |
This adds a general tutorial about QMC to explain how to use
scipy.stats.qmc
(#10844).