deerlab.relate¶
- relate(model, **functions)[source]¶
Create functional relationships between model parameters.
- Parameters:
- modeldeerlab.Model
Model object.
- functionskeyword-callable pairs
Functions describing the relationship between parameters. The keyword represents the parameter which will be funtionalized. The keyword argument must be a callable function taking a number of model parameters (names must match any of the model parameter names) as input and returning the value to be assigned to the functionalized parameter. For example:
newmodel = relate(model, parA = lambda parB: 2*parB)
will create a new model
newmodel
based onmodel
where the parameterparA
is now given by twice the value of parameterparB
. The modelnewmodel
will no longer haveparA
as a model parameter and will have a parameter less thanmodel
. Multiple parameters can be functionalized by specifying multiple keyword-callable pairs.
- Returns:
- newmodeldeerlab.Model
New model object without the functionalized parameters.