pymc4 icon indicating copy to clipboard operation
pymc4 copied to clipboard

Add Truncated Normal distribution

Open ritesh99rakesh opened this issue 4 years ago • 5 comments

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.

ritesh99rakesh avatar Mar 26 '20 16:03 ritesh99rakesh

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?

ericmjl avatar Mar 26 '20 16:03 ericmjl

Hi @ericmjl! Could you please let me know why tests are failing. I tried but could not understand what is wrong. Thanks!

ritesh99rakesh avatar Mar 27 '20 16:03 ritesh99rakesh

Thank you for comments. I also wanted to know how can I run the tests locally?

ritesh99rakesh avatar Mar 28 '20 06:03 ritesh99rakesh

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!

Sayam753 avatar Mar 28 '20 06:03 Sayam753

You can also run the tests locally by running make test in the project's root directory

lucianopaz avatar Mar 31 '20 21:03 lucianopaz