A Curve Fitter That Refuses to Answer
Code: Megapixel99/undetermined Plenty of libraries fit a curve to measurements and hand you back a number. undetermined hands back a number with the error bar it was decided by, plus an explicit undetermined list carrying a reason on each entry. It will put an observable on that list rather than fit a plateau to a drift. The README's demo adapter flips seeded coins at a ladder of input sizes (8,…
The undetermined library is designed to fit a curve to measurements and return a number with an associated error bar and list of reasons. It can handle observables that vary due to factors like coin flips or changing constants. The library refuses to confidently produce wrong answers by refusing observables that ignore their seed, fail to plateau, or have outcomes that aren't significantly different.
A constant must vary at least three times its measurement error across instances to be considered informative. The library also refuses to rate an observable that doesn't vary significantly, even if it's a degenerate case. The error bars used to be Type A, but the library now uses a metrological combined standard uncertainty formula that accounts for granule and error.
This change was made after a test in a sibling package exposed a bug in the library's old behavior. The fix widens error bars to prevent flattening drifts and ensures that significant constants are detected. The library is now available on PyPI and npm, with a shared number formatter and a single dependency decision.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.