ewoksxas.fit.data#

Shared 1D x/y data primitives and goodness-of-fit metrics for the backends.

Both fitting backends (ewoksxas.fit.lca_fit and ewoksxas.fit.peak_fit) use these: the ArrayF64/IterableF64/ DataDict aliases, the as_1d_array() helper, the immutable XYData container for observations and fitted curves, and the r2()/rmse() goodness-of-fit metrics (the latter also used by the interactive Orange fit panel to report the quality of a fitted model).

Functions

as_1d_array(iterable)

Converts a 1D numeric iterable into a flattened 1D numpy array.

r2(observed, model)

Coefficient of determination of a model against the observed data.

rmse(observed, model)

Root-mean-square error of a model against the observed data.

Classes

XYData(*, x, y)

An immutable container for 1D X and Y data.