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 1426 ibeta derivs large args #1433

Merged
merged 22 commits into from
Jun 2, 2015

Conversation

betanalpha
Copy link
Contributor

Summary:

Dramatically improves the robustness and performance of the regularized incomplete beta function derivatives, propagating the chances to neg_binomial_cdf and neg_binomial_2_cdf. Changes still need to be propagated to beta_cdf, student_t_cdf, and others.

Intended Effect:

neg_binomial_cdf and neg_binomial_2_cdf gradients are now accurate for large arguments.

How to Verify:

./runTests.py src/test/prob/neg_binomial
./runTests.py src/test/prob/neg_binomial_2

Or build a crazy model using neg_binomial_cdf or neg_binomial_2_cdf with large arguments.

Side Effects:

None. Performance should actually improve with the added checks that switch to different expansions for different arguments.

Documentation:

None.

Reviewer Suggestions:

None.

@betanalpha
Copy link
Contributor Author

@Syklic Are these fine? I ran cpplint on the new/modified stuff before
the pull request and it passed (or rather I deleted a lot of
automatically-indented whitepspace until it passed).

On Apr 30, 2015, at 12:03 AM, Stan buildbot notifications@github.com wrote:

Refer to this link for build results (access rights to CI server needed):
http://d1m1s1b1.stat.columbia.edu:8080/job/Stan%20Pull%20Request/352/

Build Log
last 20 lines

[...truncated 16 lines...]
Starting build job Stan Pull Request - Doc - Doxygen.
Starting build job Stan Pull Request - Doc - Reference Manual.
Finished Build : #346 of Job : Stan Pull Request - Doc - Reference Manual with status : SUCCESS
Finished Build : #352 of Job : Stan Pull Request - Doc - Doxygen with status : SUCCESS
Starting build job Stan Pull Request - Tests - Unit.
Starting build job Stan Pull Request - Tests - Integration.
Starting build job Stan Pull Request - Windows - Tests - Unit.
Starting build job Stan Pull Request - Tests - Header.
Finished Build : #318 of Job : Stan Pull Request - Tests - Header with status : SUCCESS
Finished Build : #320 of Job : Stan Pull Request - Tests - Integration with status : SUCCESS
Finished Build : #166 of Job : Stan Pull Request - Windows - Tests - Unit with status : SUCCESS
Finished Build : #320 of Job : Stan Pull Request - Tests - Unit with status : SUCCESS
Starting build job Stan Pull Request - CppLint.
Starting build job Stan Pull Request - Math Dependencies.
Finished Build : #72 of Job : Stan Pull Request - Math Dependencies with status : SUCCESS
Finished Build : #113 of Job : Stan Pull Request - CppLint with status : FAILURE
Build step 'MultiJob Phase' marked build as failure
Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
Setting status of 7e8db1c to FAILURE with url http://d1m1s1b1.stat.columbia.edu:8080/job/Stan%20Pull%20Request/352/ and message: Merged build finished.
Test FAILed.


Reply to this email directly or view it on GitHub.

@syclik
Copy link
Member

syclik commented May 4, 2015

@betanalpha, could you add some basic tests for:

  • ddz_inc_beta
  • ddb_inc_beta
  • dda_inc_beta

that can go in src/test/unit/math/prim/scal/fun/inc_beta_derivatives.hpp for now. All we would need is a double-based test to go there, unless this is used for stan::agrad::var also.

Or, you can just give me reasonable values for each of the values just so we can instantiate these functions stand-alone and get reasonable values out.

I'll add some more comments in the code itself.

…github.com/stan-dev/stan into feature/issue-1426-ibeta_derivs_large_args

Conflicts:
	src/stan/math/prim/scal/fun/inc_beta_derivatives.hpp
@betanalpha
Copy link
Contributor Author

Double test added.

On May 4, 2015, at 4:09 PM, Daniel Lee notifications@github.com wrote:

@betanalpha, could you add some basic tests for:

ddz_inc_beta
ddb_inc_beta
dda_inc_beta
that can go in src/test/unit/math/prim/scal/fun/inc_beta_derivatives.hpp for now. All we would need is a double-based test to go there, unless this is used for stan::agrad::var also.

Or, you can just give me reasonable values for each of the values just so we can instantiate these functions stand-alone and get reasonable values out.

I'll add some more comments in the code itself.


Reply to this email directly or view it on GitHub.

@syclik
Copy link
Member

syclik commented May 5, 2015

Final needs (I'll take care of it):

  • split apart functions to own files
  • split apart tests appropriately

@syclik
Copy link
Member

syclik commented May 11, 2015

@betanalpha: the functions are missing documentation. I'll start filling stuff in, but might need your help. The incomplete beta derivatives have been renamed and moved to:

  • src/stan/math/prim/scal/fun/inc_beta_dda.hpp
  • src/stan/math/prim/scal/fun/inc_beta_ddb.hpp
  • src/stan/math/prim/scal/fun/inc_beta_ddz.hpp

@betanalpha
Copy link
Contributor Author

Gimme an example of what you want.

On May 11, 2015, at 12:53 PM, Daniel Lee notifications@github.com wrote:

@betanalpha: the functions are missing documentation. I'll start filling stuff in, but might need your help. The incomplete beta derivatives have been renamed and moved to:

src/stan/math/prim/scal/fun/inc_beta_dda.hpp
src/stan/math/prim/scal/fun/inc_beta_ddb.hpp
src/stan/math/prim/scal/fun/inc_beta_ddz.hpp

Reply to this email directly or view it on GitHub.

@syclik
Copy link
Member

syclik commented May 22, 2015

@betanalpha, I added some doc, but I feel like it's wrong. Feel like taking a look? What I really wanted to add was something that indicated where it is expected not to work.

@stan-buildbot
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://d1m1s1b1.stat.columbia.edu:8080/job/Stan%20Pull%20Request/383/

Build Log
last 20 lines

[...truncated 11 lines...]
 > /usr/local/git/bin/git rev-parse refs/remotes/origin/origin/pr/1433/merge^{commit} # timeout=10
Checking out Revision a7d88f4780728691ecfa1506969dd6e5b3361492 (refs/remotes/origin/pr/1433/merge)
 > /usr/local/git/bin/git config core.sparsecheckout # timeout=10
 > /usr/local/git/bin/git checkout -f a7d88f4780728691ecfa1506969dd6e5b3361492
First time build. Skipping changelog.
Starting build job Stan Pull Request - Doc - Reference Manual.
Starting build job Stan Pull Request - Doc - Doxygen.
Finished Build : #377 of Job : Stan Pull Request - Doc - Reference Manual with status : SUCCESS
Finished Build : #383 of Job : Stan Pull Request - Doc - Doxygen with status : SUCCESS
Starting build job Stan Pull Request - Tests - Integration.
Starting build job Stan Pull Request - Tests - Header.
Starting build job Stan Pull Request - Windows - Tests - Unit.
Starting build job Stan Pull Request - Tests - Unit.
Finished Build : #349 of Job : Stan Pull Request - Tests - Header with status : FAILURE
Finished Build : #351 of Job : Stan Pull Request - Tests - Integration with status : ABORTED
Finished Build : #351 of Job : Stan Pull Request - Tests - Unit with status : ABORTED
Finished Build : #198 of Job : Stan Pull Request - Windows - Tests - Unit with status : ABORTED
Build step 'MultiJob Phase' marked build as failure
Setting status of 4ae4f5e020518cf670e89a6d23f6df5078cf03ff to FAILURE with url http://d1m1s1b1.stat.columbia.edu:8080/job/Stan%20Pull%20Request/383/ and message: Build finished.

Test FAILed.

@betanalpha
Copy link
Contributor Author

How's that?

@syclik syclik added this to the v2.6.3++ milestone May 27, 2015
@stan-buildbot
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://d1m1s1b1.stat.columbia.edu:8080/job/Stan%20Pull%20Request/396/

Build Log
last 20 lines

[...truncated 11 lines...]
 > /usr/local/git/bin/git rev-parse refs/remotes/origin/origin/pr/1433/merge^{commit} # timeout=10
Checking out Revision 11d2c3dd8cb6aa01e29edbc3d9fce5dca4e86cd0 (refs/remotes/origin/pr/1433/merge)
 > /usr/local/git/bin/git config core.sparsecheckout # timeout=10
 > /usr/local/git/bin/git checkout -f 11d2c3dd8cb6aa01e29edbc3d9fce5dca4e86cd0
First time build. Skipping changelog.
Starting build job Stan Pull Request - Doc - Reference Manual.
Starting build job Stan Pull Request - Doc - Doxygen.
Finished Build : #390 of Job : Stan Pull Request - Doc - Reference Manual with status : SUCCESS
Finished Build : #396 of Job : Stan Pull Request - Doc - Doxygen with status : SUCCESS
Starting build job Stan Pull Request - Tests - Integration.
Starting build job Stan Pull Request - Tests - Unit.
Starting build job Stan Pull Request - Tests - Header.
Starting build job Stan Pull Request - Windows - Tests - Unit.
Finished Build : #362 of Job : Stan Pull Request - Tests - Header with status : FAILURE
Finished Build : #364 of Job : Stan Pull Request - Tests - Unit with status : ABORTED
Finished Build : #364 of Job : Stan Pull Request - Tests - Integration with status : ABORTED
Finished Build : #211 of Job : Stan Pull Request - Windows - Tests - Unit with status : ABORTED
Build step 'MultiJob Phase' marked build as failure
Setting status of 1c63764a1ca560e3a02d7c63cf8a1eebf19c7c80 to FAILURE with url http://d1m1s1b1.stat.columbia.edu:8080/job/Stan%20Pull%20Request/396/ and message: Build finished.

Test FAILed.

@stan-buildbot
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://d1m1s1b1.stat.columbia.edu:8080/job/Stan%20Pull%20Request/397/

Build Log
last 20 lines

[...truncated 11 lines...]
 > /usr/local/git/bin/git rev-parse refs/remotes/origin/origin/pr/1433/merge^{commit} # timeout=10
Checking out Revision 41345ae3491996e5c0bc108a785bcc6264c3fbd6 (refs/remotes/origin/pr/1433/merge)
 > /usr/local/git/bin/git config core.sparsecheckout # timeout=10
 > /usr/local/git/bin/git checkout -f 41345ae3491996e5c0bc108a785bcc6264c3fbd6
First time build. Skipping changelog.
Starting build job Stan Pull Request - Doc - Reference Manual.
Starting build job Stan Pull Request - Doc - Doxygen.
Finished Build : #391 of Job : Stan Pull Request - Doc - Reference Manual with status : SUCCESS
Finished Build : #397 of Job : Stan Pull Request - Doc - Doxygen with status : SUCCESS
Starting build job Stan Pull Request - Windows - Tests - Unit.
Starting build job Stan Pull Request - Tests - Integration.
Starting build job Stan Pull Request - Tests - Unit.
Starting build job Stan Pull Request - Tests - Header.
Finished Build : #363 of Job : Stan Pull Request - Tests - Header with status : SUCCESS
Finished Build : #365 of Job : Stan Pull Request - Tests - Integration with status : FAILURE
Finished Build : #365 of Job : Stan Pull Request - Tests - Unit with status : ABORTED
Finished Build : #212 of Job : Stan Pull Request - Windows - Tests - Unit with status : ABORTED
Build step 'MultiJob Phase' marked build as failure
Setting status of 836d3355ef197180598936ca933090d3c8ceebb3 to FAILURE with url http://d1m1s1b1.stat.columbia.edu:8080/job/Stan%20Pull%20Request/397/ and message: Build finished.

Test FAILed.

@stan-buildbot
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://d1m1s1b1.stat.columbia.edu:8080/job/Stan%20Pull%20Request/399/
Test PASSed.

syclik added a commit that referenced this pull request Jun 2, 2015
…s_large_args

fixes #1426. Feature/issue 1426 ibeta derivs large args
@syclik syclik merged commit ee7538b into develop Jun 2, 2015
@syclik syclik deleted the feature/issue-1426-ibeta_derivs_large_args branch June 2, 2015 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants