jacobian()#
- InterpDiscreteModel.jacobian(parameter, state, input_=None)#
Sum the state Jacobian of each model operator.
This the derivative of the right-hand side of the model with respect to the state, i.e., the function \(\ddqhat\fhat(\qhat, \u; \bfmu)\) where the model is given by \(\qhat(\bfmu)_{j+1} = \fhat(\qhat(\bfmu)_{j}, \u_{j}; \bfmu)\).
- Parameters:
- parameter(p,) ndarray
Parameter value \(\bfmu\).
- state(r,) ndarray
State vector \(\qhat\).
- input_(m,) ndarray or None
Input vector \(\u\).
- Returns:
- jac(r, r) ndarray
State Jacobian of the right-hand side of the model.
Notes
For repeated
jacobian()
calls with the same parameter value, useevaluate()
to first get the nonparametric model corresponding to the parameter value.# Instead of this... >>> jacs = [parametric_model.jacobian(parameter, q, input_) ... for q in list_of_states] # ...it is faster to do this. >>> model_at_parameter = parametric_model.evaluate(parameter) >>> jacs = [model_at_parameter.jacobian(q, input_) ... for q in list_of_states]