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

Add support for many more MIRA probonto distributions #593

Merged
merged 7 commits into from
Jul 30, 2024

Conversation

SamWitty
Copy link
Contributor

See #590 for the original PR from @liunelson .

@SamWitty SamWitty added enhancement New feature or request WIP PR submitter still making changes, not ready for review labels Jul 24, 2024
@SamWitty SamWitty self-assigned this Jul 24, 2024
@SamWitty
Copy link
Contributor Author

@liunelson , why are some of the types for the parameters Dict[str, Union[float, list]] and not just Dict[str, float]?

See e.g. mira_betabinomial_to_pyro

@SamWitty
Copy link
Contributor Author

@liunelson , it looks like you used Gamma where you meant to use InverseGamma.

Also, I'd like to add some tests to ensure these mappings are completed correctly. Do you have any example AMRs that use some of these new distributions?

@liunelson
Copy link
Contributor

@liunelson , why are some of the types for the parameters Dict[str, Union[float, list]] and not just Dict[str, float]?

See e.g. mira_betabinomial_to_pyro

The Pyro Binomial distribution expects a list for either the probs or logs arguments
https://docs.pyro.ai/en/stable/distributions.html#binomial

You're right about the BetaBinomial distribution; it just wants Dict[str, float]; I copy-and-pasted the type hints from the Binomial one.

@liunelson
Copy link
Contributor

I don't actually have any example of AMRs handy that use all these different probability distributions.

However, MIRA has this test but it just directly invokes a LogNormal1 distribution out of the blue.
https://github.com/gyorilab/mira/blob/7d98f519f06a471284009b56e7af9b0d8f4201e9/tests/test_modeling/test_petri.py#L38

@liunelson
Copy link
Contributor

Besides the type hinting of the BetaBinomial function, everything else looks fine to me.

@SamWitty SamWitty added awaiting review PR submitter awaiting code review from reviewer and removed WIP PR submitter still making changes, not ready for review labels Jul 30, 2024
@anirban-chaudhuri anirban-chaudhuri merged commit a44045f into main Jul 30, 2024
5 checks passed
@anirban-chaudhuri anirban-chaudhuri deleted the sw-nliu-distributions branch July 30, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review PR submitter awaiting code review from reviewer enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants