Right now, there are some operations that cause pointSet distributions to be invalid. We've also previously had issues where these distributions had NaN results.
We should have functions to validate():
Continuous
Xs are ordered.
There should be at most 2 (or maybe 1) of every X value.
All X values should be finite numbers.
All Y values should be finite numbers at or above zero.
Discrete
Keys are all finite.
Values (probability mass) is finite, at or above zero.
In the future, we'll likely want to not allow discrete dists with over some number of options (500, maybe?). At some number, pointwise operations become impossible.
Validate() should call corresponding errors for each problem.
See: https://github.com/quantified-uncertainty/squiggle/issues/243
Right now, there are some operations that cause pointSet distributions to be invalid. We've also previously had issues where these distributions had NaN results.
We should have functions to
validate()
:Continuous
Discrete
Validate()
should call corresponding errors for each problem.