pymc4
pymc4 copied to clipboard
Add Truncated Normal distribution
I was looking to contribute to PyMC4 and based on #44 I thought I would add the discrete Truncated Normal distribution for a start. When I looked at the source it seems to me that the Truncated Normal distribution is not available either.
This is my first contribution to PyMC so please let me know if there are any particular tests you'd like me to add and if something needs to be fixed in the PR.
I’ll chime in from my lunchtime - first off, thanks for the PR! :tada:
If you study the tests that are present, I think we try to make sure that we can at least sample from the distribution. Perhaps give that a shot?
Hi @ericmjl! Could you please let me know why tests are failing. I tried but could not understand what is wrong. Thanks!
Thank you for comments. I also wanted to know how can I run the tests locally?
I have pytest
installed in my virtualenv.
- For running all tests -
pytest -v tests
- For running a specific test,
Type pytest --collect-only
in the base directory for pymc4
to capture test function signature and run the test.
Example -
pytest -v tests/test_distributions.py::test_rvs_logp_and_forward_sample[scalar_parameters-AR]
I am not sure if there is any other way to run tests locally!
You can also run the tests locally by running make test
in the project's root directory