inversion_ideas.base.Objective#
- class inversion_ideas.base.Objective[source]#
Abstract representation of an objective function.
Attributes
Methods
__call__(model)Evaluate the objective function for a given model.
gradient(model)Evaluate the gradient of the objective function for a given model.
hessian(model)Evaluate the hessian of the objective function for a given model.
hessian_diagonal(model)Get the main diagonal of the Hessian.
info()Get information about the objective function.
set_name(value)Set name for the objective function.
Attributes#
- Objective.n_params#
Number of model parameters.
- Objective.name#
Name of the objective function.
Methods#
Methods documentation
- abstractmethod Objective.__call__(model)[source]#
Evaluate the objective function for a given model.
- abstractmethod Objective.gradient(model)[source]#
Evaluate the gradient of the objective function for a given model.
- abstractmethod Objective.hessian(model)[source]#
Evaluate the hessian of the objective function for a given model.
- Parameters:
- model(n_params,)
array Array with model values.
- model(n_params,)
- Returns:
- (n_params, n_params)
arrayorLinearOperator 2D array or
LinearOperatorthat represents the Hessian matrix of the objective funciton, or an approximated version of it.
- (n_params, n_params)