-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Unit test LDLT_factor better and fix derivative bug #346
Conversation
…asinh, atan2, atan
… inv_logit, log_inv_logit
…ogit, log_sum_exp, log
…tor_div, operator_eq, operator_gte, operator_gt, operator_lte, operator_lt
…us_minus, operator_mult, operator_mult_eq, operator_neq
…r_plus_eq, opeartor_subtr, operator_unary_minus
…quare, tan, tanh, trunc
Feature/fix header guards
Jenkins, retest this please. |
…aking sure test-headers pass
Feature/clean up fvar
…or_msg Unify the format of the write_error_msg
Test PASSed. |
Adding some more agrad rev tests.
@mbrubake, here's the minimum that needs to get done before this can be merged. I'll try to help out, but there's still a lot of work to be done. At a high level, each function should be in its own header file, each header file should only be defining things in one namespace (excluding anonymous namespace functions), each math function should have tests, each agrad function should have value tests, derivative tests (if you can calculate it analytically), and finite difference tests for the gradients. I'm going to add two task lists. The first is a list of things I've noticed in the existing files. The second task-list is a grid that should help us keep track of what has been done and what needs to get done. TODO
|
I'm moving the checklist to the first comment of the pull request. |
Ok, I'll try to do some of the splitting of files. Do we really need finite diff tests if we have analytic derivative tests? That seems redundant. Regarding the namespace issue in src/stan/agrad/rev/matrix/ldlt.hpp, @bob-carpenter sent an email about that last week or sometime around then. This is a somewhat necessary evil unless I'm missing some template magic. Basically, in a function like multi_normal_log we need to be able to write
where T is a template parameter of either double or var and get the right class. If there is some way to do this with |
On Mon, Nov 18, 2013 at 1:23 PM, Marcus Brubaker
Yes, it's redundant, but yes, I think we should include them. They end up
I'm pretty sure we used that "trick" in operands and partials to make that C++ is hairy. BTW, this is basically the same pattern that is used to define numerical
|
…every-it fixes stan-dev#387 -- printing on every iteration in every block
…o mbrubake-feature/fix-ldlt
…d test files for the missing ones (no tests included)
@mbrubake, I just created a pull request to your forked branch. I'll go through and break apart the stan/agrad/rev/matrix/ldlt.hpp header file next. The pull request currently passes test-headers and test-unit. Can you write unit tests for:
|
Supersedes #45, which I'm closing. |
… test files for missing tests (no tests included)
@mbrubake, I updated the pull request with the agrad version split out. The pull request currently passes test-headers and test-unit. Can you write unit tests for:
|
feature/fix-ldlt: split apart math/matrix/ldlt functions, put down placeholders for tests.
@syclik, create a new pull request with a branch within stan-dev. |
|
Checklist
mdivide_left_ldlt
src/stan/math/matrix/
src/test/math/matrix/
src/stan/agrad/rev/matrix/
src/test/agrad/rev/matrix/
mdivide_right_ldlt
src/stan/math/matrix/
src/test/math/matrix/
src/stan/agrad/rev/matrix/
(don't need header file -- the one in src/stan/math/matrix is templated properly)src/test/agrad/rev/matrix/
log_determinant_ldlt
src/stan/math/matrix/
src/test/math/matrix/
src/stan/agrad/rev/matrix/
src/test/agrad/rev/matrix/
trace_gen_inv_quad_form_ldlt
src/stan/math/matrix/
src/test/math/matrix/
src/stan/agrad/rev/matrix/
src/test/agrad/rev/matrix/
trace_inv_quad_form_ldlt
src/stan/math/matrix/
src/test/math/matrix/
src/stan/agrad/rev/matrix/
src/test/agrad/rev/matrix/
This pull request: