LogDensityProblems.jl icon indicating copy to clipboard operation
LogDensityProblems.jl copied to clipboard

revamp stress testing

Open tpapp opened this issue 2 years ago • 1 comments

It is time for a redesign of the stress testing framework. Specifically,

  1. Restrict input range. Using Cauchy for random coordinates is excessive, as it can easily result in values outside 1000 which is crazy, and leads to hiccups even for posteriors that are carefully implemented numerically but have a nonlinear transformation (eg anything remotely involving exp).

  2. Reporting should be more nuanced. Every bad value should have a list of properties that were violated (eg non-finite but inf values, non-finite derivatives, incorrect derivatives when compared against finite differences, etc). Cf #42.

  3. Stress tests should be modular, allowing the user to pick and combine them as necessary.

tpapp avatar Dec 15 '23 16:12 tpapp

Tentatively, I am thinking about the following:

  1. each stress test is a module, that reports the order it needs (derivatives or not),
  2. stresstest figures out the values it needs,
  3. random coordinate generation is also customizable (eg box in [-B, B]^D where B is around 50,
  4. random coordinates are generated, derivatives are calculated up to order K, then each module checks something and then either returns nothing or something that will be inserted into a vector that is paired with each offending coordinate.

tpapp avatar Dec 15 '23 16:12 tpapp