Bases: object
The superclass of all models with parameters.
Subclassing
Subclasses should implement the following abstract properties and methods:
Takes a single argument as the model input, returns the model output
a sequence of names for the parameters of the model
a sequence of values for the parameters of the model
Optional overrides:
a dictionary with keys as parameter names and values as the value for that parameter
compute the inverse of the model
x.__init__(...) initializes x; see help(type(x)) for signature
Methods
inv(output, *args, **kwargs) | Compute the inverse of this model for the requested output. |
Attributes
data | The fitting data for this model. |
errors | Error on the data. |
params | A decorator indicating abstract properties. |
pardict | A dictionary of the parameter names and values. |
parvals | A decorator indicating abstract properties. |
weightstype | Determines the statistical interpretation of the weights in data. |
The fitting data for this model. Should be either None, or a tuple(datain,dataout,weights). Note that the weights are interpreted statistically as errors based on the weightstype attribute.
Error on the data. Sets the weights on data assuming the interpretation for errors given by weightstype. If data is None/missing, a TypeError will be raised.
Compute the inverse of this model for the requested output.
Parameters: | output – The output value of the model at which to compute the inverse. |
---|---|
Returns: | The input value at which the model produces output |
Raises ModelTypeError: | |
If the model is not invertable for the provided data set. |
A sequence of the parameter names (not editable for instances).
A dictionary of the parameter names and values.
Determines the statistical interpretation of the weights in data. Can be:
Weights act as inverse errors (default)
Weights act as inverse variance
Weights act as errors (non-standard - this makes points with larger error bars count more towards the fit).
Weights act as variance (non-standard - this makes points with larger error bars count more towards the fit).