inversion_ideas.base.Objective#
- class inversion_ideas.base.Objective#
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)#
Evaluate the objective function for a given model.
- abstractmethod Objective.gradient(model)#
Evaluate the gradient of the objective function for a given model.
- abstractmethod Objective.hessian(model)#
Evaluate the hessian of the objective function for a given model.
- Objective.hessian_diagonal(model)#
Get the main diagonal of the Hessian.
- Parameters:
- model(n_params) array
Array with model values.
- Returns:
- (n_params,) array
Array containing the diagonal of the Hessian.
- Objective.info()#
Get information about the objective function.
- Objective.set_name(value)#
Set name for the objective function.