-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
Fix weibull lcdf #2811
Fix weibull lcdf #2811
Conversation
Update weibull_lcdf.hpp remove unnecessary logic [Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
8f428ce
to
48f52f1
Compare
@rok-cesnovar I don't know how to fix the expression tests for changes up to commit 9c1f7ac (2nd to last commit). Though the changes are minimal. For the final commit, I ended up following the neg_binomial_2_l/cdf files which meant overhauling the files. In my opinion, the file is more readable but would like you or others to take a look. There aren't great tests for these functions so my plan is to add them as well. @nhuurre for y values of 0 I have the function returning 0 for the cdf and negative infinity for the lcdf. I believe the cdf is right. I'm wondering if the lcdf is correct or if it should also return 0. |
Negative infinity for the lcdf is correct. The derivatives should be well-defined (and zero) when |
Shoot, I was hoping it was for all alpha because this raises a question about what we do with the |
CDF derivative with respect to which goes to negative infinity at |
@rok-cesnovar I don't know how to update the opencl version of weibull cdf. It needs to return 0 for the gradients when y is 0 and I'm getting header check errors when I try to update. |
Looking into it now. |
…nto fix-weibull-lcdf
Obsoleted by #3037 |
Fix for #2810.
Release notes
Makes the Weibull cdf/lcdf more stable by using
log1m_exp
function.Checklist
Math issue update weibull lcdf/cdf to handle 0 as an input #2810
Copyright holder: Sean Pinkney
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit
)make test-headers
)make test-math-dependencies
)make doxygen
)make cpplint
)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested