waltlabtools.core.Model¶
- class Model(fun=None, inverse=None, name='', params=(), xscale='linear', yscale='linear')[source]¶
Mathematical model for calibration curve fitting.
A Model is an object with a function and its inverse, with one or more free parameters that can be fit to calibration curve data.
- Parameters
fun (
function
) -- Forward functional form. Should be a function which takes in x and other parameters and returns y. The first parameter of fun should be x, and the remaining parameters should be the coefficients which are fit to the data (typically floats).inverse (
function
) -- Inverse functional form. Should be a function which takes in y and other parameters and returns x. The first parameter of inverse should be y, and the remaining parameters should be the same coefficients as in fun.name (
str
) -- The name of the function. For example, "4PL" or "linear".params (list-like of
str
) -- The names of the parameters for the function. This should be the same length as the number of arguments which fun and inverse take after their inputs x and y, respectively.xscale, yscale ({"linear", "log", "symlog", "logit"}, default "linear") -- The natural scaling transformations for x and y. For example, "log" means that the data may be distributed log-normally and are best visualized on a log scale.