Skip to content

Hypergeometric function improvements #511

@sakrejda

Description

@sakrejda

Summary:

Our hypergeometric functions don't implement the accuracy and speed related improvements available in other libraries, this might lead to limited accuracy in some cases. This needs to be tackled after issues hypergeometric functions have proper tests (issue #27) and after hypergeometric functions are correct (issue #488). I will either add the model demonstrating these issues in a real example or move this stuff to a Wiki as it's only borderline specific enough.

Description:

  • I have a model that relies incomplete gamma functions and appears to fail due to innacurate computations (dropping stepsize despite lack of divergences), can't get accept probability consistently high, will post model once I verify.
  • Issue Bugfix/issue 487 hypergeometric functions #488 has some background on which functions can be expected to have problems.
  • We never check conditions on convergence of gradients even with fixes in Bugfix/issue 487 hypergeometric functions #488 as these are different from conditions on functions
  • Mathematica and other sources rely on analytic continuation and other tricks to get accurate results, esp near boundaries, and we don't (AFAIK)
  • There's a Julia implementation for 3F2 (and paper) by Barton.
  • We need some test-cases where this fails

Specifics:

  • add example demonstration failure caused by lack of accuracy.
  • add example demonstrating issue caused by slow convergence.
  • add convergence check functions for grad_3F2 and grad_2F1.
  • use reflection near |z|==1 and possibly a continuation at |z|==1
  • Check what effort would be invovled in the acceleration methods mentioned by Johansson

Reproducible Steps:

Adding example.

Current Output:

Stepsize keeps dropping b/c density or gradient is not accurate enough, will add doc.

Expected Output:

Apparent convergence

Current Version:

v2.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions