Package park :: Package modelling :: Module model :: Class Model

Class Model

source code


Model definition.

The model manages attribute access to the fitting parameters and also manages the dataset.

derivatives ['p1','p2',...]
List of parameters for which the model can calculate derivatives. The eval_derivs() method will be called to calculate the derivatives with respect to the parameters. Parameters with no analytic derivatives available will be approximated by numerical differentiation.
eval(x)
Evaluate the model at x. This must be defined by the subclass.
eval_deriv(x,pars=[])
Evaluate the model and the derivatives at x. This must be defined by the subclass.
parameters
The names of the model parameters. If this is not provided, then the model will search the subclass for park.Parameter attributes and construct the list of names from that. Any parameters in the list not already defined as park.Parameter attributes will be defined as parameters with a default of 0.
parameterset
The set of parameters defined by the model. These are the parameters themselves, gathered into a park.ParameterSet.

The minimum fittng model if you choose not to subclass park.Model requires parameterset and a residuals() method.

Nested Classes
  __metaclass__
Place class level parameter definitions into the parameter set.
Instance Methods

Inherited from BaseModel: __call__, __getitem__, __init__, __setitem__, eval, eval_derivs, set

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables
  parameterset = <park.modelling.parameter.ParameterSet object a...

Inherited from BaseModel: derivatives, parameters

Properties

Inherited from object: __class__

Class Variable Details

parameterset

Value:
<park.modelling.parameter.ParameterSet object at 0x2348eb0>