-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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 asymetric laplace distribution #4351
Comments
Hey @twiecki , could you please explain the issue a bit more. I would love to work on this issue. |
@chandan5362 That's great. As you can see in the link, the distribution is already implemented. So you would copy & paste that into |
@twiecki Thanks for the help. I am little confused here. where should I add unittests ?. whether should I create separate file or I will have to add it to the existing one. |
@chandan5362 you should add your unit test in the existing files with unit tests for the other distributions: You can also have a look and check what kind of tests are there for the existing distributions. |
If there are no assignees to this sometime soon, I am happy to submit a PR in the near future.
|
@chandan5362 Are you actively working on this? |
@twiecki @CloudChaoszero yeah, I am still working on it and I will make a PR tomorrow or day after tomorrow. |
Oh hey, no worries @chandan5362, just checking to see if it was officially active. haha |
hey @twiecki , as https://github.com/epidemics/COVIDNPIs/blob/manuscript/epimodel/pymc3_distributions/asymmetric_laplace.py contains only logpdf and all other instances of test functions in test_distribution.py contains both logpdf and logcdf. So, would it be alright if I add unit test only for logpdf. Since I am new to this repo and still understanding the codebase, a little help in writing the unit test would be much helpful 😐. |
@chandan5362 It's fine to not have a logcdf for this one. You can just copy a test for another distribution in |
yeah , sounds cool. |
hey @twiecki , would you please help me here a little ? |
You could just copy their logpdf function from the source code: https://github.com/scipy/scipy/blob/74875a8e60ba1117dc98743b3297234f5ea6cf9a/scipy/stats/_continuous_distns.py#L4143-L4147 A similar thing is done for the |
sounds cool. |
Closed in #4392 |
There is an implementation here we could port quite easily: https://github.com/epidemics/COVIDNPIs/blob/manuscript/epimodel/pymc3_distributions/asymmetric_laplace.py
The text was updated successfully, but these errors were encountered: