Skip to content
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

Adding example on marginalizing models #628

Merged
merged 6 commits into from
Feb 17, 2024
Merged

Adding example on marginalizing models #628

merged 6 commits into from
Feb 17, 2024

Conversation

zaxtax
Copy link
Contributor

@zaxtax zaxtax commented Jan 19, 2024

This adds an example for how to use the MarginalModel class in pymc-experimental


📚 Documentation preview 📚: https://pymc-examples--628.org.readthedocs.build/en/628/

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@twiecki
Copy link
Member

twiecki commented Jan 20, 2024

Love it!

@twiecki
Copy link
Member

twiecki commented Jan 20, 2024

@zaxtax
Copy link
Contributor Author

zaxtax commented Jan 20, 2024 via email

@twiecki
Copy link
Member

twiecki commented Jan 20, 2024

image

@twiecki
Copy link
Member

twiecki commented Jan 20, 2024

There's more though, just read the whole page.

@twiecki
Copy link
Member

twiecki commented Jan 20, 2024

Waiting a few days in case someone else wants to review.

@ricardoV94
Copy link
Member

I want to!

@@ -0,0 +1,1440 @@
{
Copy link
Member

@ricardoV94 ricardoV94 Jan 20, 2024

Choose a reason for hiding this comment

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

But if you insist on using the NUTS sampler *exclusively*.

Link to wiki on Rao-Blackwell's theorem, and maybe only bring it up after explaining the advantages of marginalizing variables: more efficient sampling, unclear statistical properties of mixed sampling...

get a lower variance estimate of your parameters is a bit fuzzy. Get a smaller monte-carlo error on the estimates?

Call it pymc_experimental not pmx and maybe mention already the MarginalModel class with a cross-reference to the respective docs page


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What's the correct way to cross-reference the pymc_experimental docs?

Copy link
Member

Choose a reason for hiding this comment

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

You can see how cross-references work in #614.

Copy link
Member

Choose a reason for hiding this comment

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

Also #605

examples/howto/marginalizing-models.ipynb Show resolved Hide resolved
examples/howto/marginalizing-models.ipynb Show resolved Hide resolved
examples/howto/marginalizing-models.ipynb Show resolved Hide resolved
examples/howto/marginalizing-models.ipynb Show resolved Hide resolved
examples/howto/marginalizing-models.ipynb Show resolved Hide resolved
examples/howto/marginalizing-models.ipynb Show resolved Hide resolved
examples/howto/marginalizing-models.ipynb Show resolved Hide resolved
examples/howto/marginalizing-models.ipynb Show resolved Hide resolved
examples/howto/marginalizing-models.ipynb Show resolved Hide resolved
@@ -0,0 +1,1527 @@
{
Copy link
Member

@ricardoV94 ricardoV94 Feb 5, 2024

Choose a reason for hiding this comment

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

Add labels and title to plot


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

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

None of the other histograms for the gmm have labels and title. What labels and title do you suggest?

examples/howto/marginalizing-models.ipynb Show resolved Hide resolved
examples/howto/marginalizing-models.ipynb Show resolved Hide resolved
@@ -0,0 +1,1510 @@
{
Copy link
Member

@ricardoV94 ricardoV94 Feb 10, 2024

Choose a reason for hiding this comment

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

Some typo somewhere

in

"to where that choice is not our model. "


Reply via ReviewNB

@zaxtax
Copy link
Contributor Author

zaxtax commented Feb 16, 2024

Ok hopefuly, that's more clear

@twiecki twiecki merged commit 96a2b19 into pymc-devs:main Feb 17, 2024
2 of 3 checks passed
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.

3 participants