-
-
Notifications
You must be signed in to change notification settings - Fork 200
Fixing propto tests in probability test framework #1764
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
cfcff04
Changed logic for select_var_param select the nth parameter instead o…
bbbales2 4ffbd3c
Check value_of_rec in results so that propto check works for all auto…
bbbales2 fa14478
Merge branch 'develop' into bugfix/issue-1763-propto-tests
bbbales2 5698804
Removed poisson approximation from negative binomial and updated the …
bbbales2 fc3a47b
[Jenkins] auto-formatting by clang-format version 6.0.0
stan-buildbot d100bc7
Merge remote-tracking branch 'origin' into bugfix/issue-1763-propto-t…
bbbales2 ff6046d
Removed vector check from select_var_param and added gradient checks …
bbbales2 2ff7275
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot 49de095
Use long double in test to avoid precision loss (Issue #1763)
bbbales2 e8e373f
Merge branch 'bugfix/issue-1763-propto-tests' of https://github.com/s…
bbbales2 483a3c0
Replaced EXPECT_EQ with EXPECT_NEAR for float comparison of normalizi…
bbbales2 ed2b7f2
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot 8213edf
Added missing T_loc arguments to include_summand terms in pareto_type…
bbbales2 edf1b22
Merge branch 'bugfix/issue-1763-propto-tests' of https://github.com/s…
bbbales2 ea096c0
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot ee2cf8d
Added n = 0, n = 1 tests to negative binomial pdf (Issue #1763)
bbbales2 fa21fe0
Merge branch 'bugfix/issue-1763-propto-tests' of https://github.com/s…
bbbales2 283a2b0
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot 4e4ad06
Pulled alpha/beta values into their own containers (Issue #1763)
bbbales2 a6c5759
Merge branch 'bugfix/issue-1763-propto-tests' of https://github.com/s…
bbbales2 c1822fc
Switching back to logs of value_ofs in neg_binomial. Adding some chan…
bbbales2 55cf763
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.0…
stan-buildbot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #include <stan/math/rev.hpp> | ||
| #include <test/unit/math/test_ad.hpp> | ||
| #include <gtest/gtest.h> | ||
| #include <boost/math/differentiation/finite_difference.hpp> | ||
|
|
||
| TEST(mathMixScalFun, neg_binomial_lpmf_derivatives) { | ||
| auto f = [](const int y) { | ||
| return [=](const auto& alpha, const auto& beta) { | ||
| return stan::math::neg_binomial_lpmf(y, alpha, beta); | ||
| }; | ||
| }; | ||
|
|
||
| stan::test::expect_ad(f(0), 1.5, 4.1); | ||
| stan::test::expect_ad(f(0), std::vector<double>({1.2, 2.0}), | ||
| std::vector<double>({1.1, 1.2})); | ||
| stan::test::expect_ad(f(6), 1.5, 4.1); | ||
| stan::test::expect_ad(f(6), std::vector<double>({1.7, 2.0}), | ||
| std::vector<double>({1.1, 2.3})); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.