Skip to content
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

Feature/issue 962 bivar norm #1009

Closed
wants to merge 41 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f1964a3
Binormal integral using Owens T functions and test
rtrangucci Aug 13, 2018
8976a72
Binormal tests passing
rtrangucci Aug 14, 2018
26c5a9c
More accurate numeric evaluation of bivariate normal integral
rtrangucci Aug 14, 2018
21f2333
Rev tests
rtrangucci Aug 15, 2018
c6f9d34
gradient tests
rtrangucci Aug 15, 2018
5b7f6f8
Varis on stack test
rtrangucci Aug 15, 2018
d85f493
Fwd tests added
rtrangucci Aug 15, 2018
b427d4f
More efficient gradient calculations
rtrangucci Aug 15, 2018
611636b
Accuracy tested vs. MM acceptable
rtrangucci Aug 17, 2018
e459c7c
Generalized function specification, added testing to test higher-orde…
rtrangucci Aug 20, 2018
ad8dbbc
Removed old test
rtrangucci Aug 21, 2018
f078373
Doc for lcdf
rtrangucci Aug 21, 2018
d530927
Binormal lpdf added
rtrangucci Aug 21, 2018
a14dcd4
Fixed typo in lpdf referring to sigma
rtrangucci Aug 22, 2018
e01221e
Rewrite of lcdf and tests to take 2-vector y args
rtrangucci Aug 24, 2018
53f31ff
Added all permutations of tests for vectorized calls
rtrangucci Aug 27, 2018
36e85c9
Added finite diff testing to reverse mode AD
rtrangucci Aug 27, 2018
257b1fe
Higher order tests and mixed mode tests
rtrangucci Aug 27, 2018
2b8a660
Removed old files
rtrangucci Aug 27, 2018
2a36726
Removed old test file
rtrangucci Aug 27, 2018
abf12bc
Reverting cdf log changes
rtrangucci Aug 27, 2018
82aaaff
Adding lcdf to prim mat header file
rtrangucci Aug 27, 2018
315b830
Doc added
rtrangucci Aug 27, 2018
d4c9ad4
Added includes for header tests
rtrangucci Aug 27, 2018
1a88b14
Lint changes
rtrangucci Aug 27, 2018
b358949
Lint fixes and fixes test errors
rtrangucci Aug 27, 2018
ff53f15
Merge commit '14b8c56e7a6d4f21b5346e255e63e3df09517e76' into HEAD
yashikno Aug 27, 2018
4199f64
[Jenkins] auto-formatting by clang-format version 6.0.0 (tags/google/…
stan-buildbot Aug 27, 2018
a2047c3
Lint fixes
rtrangucci Aug 28, 2018
464a9b7
Inlined double std_binormal_integral
rtrangucci Aug 28, 2018
786e75f
Fixes sign-comparison warnings
rtrangucci Aug 29, 2018
0ea95ec
Updated gradients to handle boundary conditions
rtrangucci Sep 6, 2018
a6dd957
Merge commit '09a2aa82a06c4f702dd8583e6683d461194dcdc1' into HEAD
yashikno Sep 6, 2018
132dba6
[Jenkins] auto-formatting by clang-format version 5.0.2-svn328729-1~e…
stan-buildbot Sep 6, 2018
73a2c3e
Updates to tests for gradients at boundaries
rtrangucci Sep 6, 2018
1963d81
Merge branch 'feature/issue-962-bivar-norm' of ssh://github.com/stan-…
rtrangucci Sep 6, 2018
5c99911
[Jenkins] auto-formatting by clang-format version 5.0.2-svn328729-1~e…
stan-buildbot Sep 6, 2018
e8ad567
Fixes errant cout, adds square
rtrangucci Sep 7, 2018
c5cb5a2
[Jenkins] auto-formatting by clang-format version 5.0.2-svn328729-1~e…
stan-buildbot Sep 7, 2018
36f16f1
Fix rho initialization problem
rtrangucci Sep 8, 2018
0c0ea11
Merge branch 'develop' into feature/issue-962-bivar-norm
syclik Dec 17, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Jenkins] auto-formatting by clang-format version 5.0.2-svn328729-1~e…
…xp1~20180509124008.99 (branches/release_50)
  • Loading branch information
stan-buildbot committed Sep 6, 2018
commit 5c99911e4da976fdf2c6154d38c0d4d8bbd978a3
22 changes: 9 additions & 13 deletions test/unit/math/rev/scal/fun/std_binormal_integral_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
#include <gtest/gtest.h>
#include <limits>

using Eigen::Matrix;
using Eigen::Dynamic;
using Eigen::Matrix;

struct VVV_std_binorm_integral {
template <typename T>
inline T operator()(
const Eigen::Matrix<T, Eigen::Dynamic, 1>& inp_vec) const {
return stan::math::std_binormal_integral(inp_vec(0),
inp_vec(1), inp_vec(2));
return stan::math::std_binormal_integral(inp_vec(0), inp_vec(1),
inp_vec(2));
}
};

Expand All @@ -28,7 +28,6 @@ void compare_grad_known(const F1& f1,
EXPECT_FLOAT_EQ(exp_grad(i), grad_f1(i));
}


TEST(MathFunctions, binormal_integral_using) {
using stan::math::std_binormal_integral;
}
Expand Down Expand Up @@ -331,27 +330,24 @@ TEST(MathFunctions, binormal_integral_grad_test_vvv_at_boundary) {
compare_grad_known(test_fun, expected_grad, inp_vec);

inp_vec << std::numeric_limits<double>::infinity(),
std::numeric_limits<double>::infinity(), 0.4;
std::numeric_limits<double>::infinity(), 0.4;
expected_grad << 0, 0, 0;
compare_grad_known(test_fun, expected_grad, inp_vec);

inp_vec << -std::numeric_limits<double>::infinity(),
-std::numeric_limits<double>::infinity(), 0.4;
-std::numeric_limits<double>::infinity(), 0.4;
expected_grad << 0, 0, 0;
compare_grad_known(test_fun, expected_grad, inp_vec);

inp_vec << -std::numeric_limits<double>::infinity(),
1, 1;
inp_vec << -std::numeric_limits<double>::infinity(), 1, 1;
expected_grad << 0, 0, 0;
compare_grad_known(test_fun, expected_grad, inp_vec);

inp_vec << 1, -std::numeric_limits<double>::infinity(),
1;
inp_vec << 1, -std::numeric_limits<double>::infinity(), 1;
expected_grad << 0, 0, 0;
compare_grad_known(test_fun, expected_grad, inp_vec);

inp_vec << 1, -std::numeric_limits<double>::infinity(),
-1;
inp_vec << 1, -std::numeric_limits<double>::infinity(), -1;
expected_grad << 0, 0, 0;
compare_grad_known(test_fun, expected_grad, inp_vec);

Expand All @@ -365,7 +361,7 @@ TEST(MathFunctions, binormal_integral_grad_test_vvv_at_boundary) {

inp_vec << 3, 1, -1;
expected_grad << 1 / sqrt(2 * stan::math::pi()) * exp(-0.5 * 9),
1 / sqrt(2 * stan::math::pi()) * exp(-0.5), 0;
1 / sqrt(2 * stan::math::pi()) * exp(-0.5), 0;
compare_grad_known(test_fun, expected_grad, inp_vec);

inp_vec << -1, 1, -1;
Expand Down