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

Created truncatedprior.py #875

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Created truncatedprior.py #875

wants to merge 1 commit into from

Conversation

speco29
Copy link

@speco29 speco29 commented Jan 22, 2025

fixes #779
This function leverages the truncnorm distribution from the SciPy library to generate samples from a truncated normal distribution. You can adapt the function to other distributions by changing the import statement and parameters.

Thank your for opening a PR!

Before you proceed, please check the following notes.

  • Make sure you describe the changes introduced in the PR.
  • If this PR addresses an existing issue, please mention it here.
  • Check our Guidelines for Contributing.
  • In particular, pay attention to the pull request checklist.
  • The most important points are to
    • Install all the needed requirements (requirements.txt, requirements-dev.txt, etc.)
    • Make sure all test pass.
    • Make sure your code passes black.
    • Make sure your code passes pylint.

fixes bambinos#779 
This function leverages the truncnorm distribution from the SciPy library to generate samples from a truncated normal distribution. You can adapt the function to other distributions by changing the import statement and parameters.
@tomicapretto
Copy link
Collaborator

Hi @speco29, thanks for the interest in contributing, but this is not what is intended by the issue, which I admit, is very poorly described. What we want is something more general that allows users to truncate any prior distribution, using pymc.Truncated under the hood. I'll add more info in the issue.

@speco29
Copy link
Author

speco29 commented Jan 24, 2025

Thank you for the review @tomicapretto .
I'll dive into it deeper and will correct it.

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.

Add TruncatedPrior
2 participants