pybop.costs.design_cost#
Classes#
Base design cost. |
Module Contents#
- class pybop.costs.design_cost.DesignCost(target: str)[source]#
Bases:
pybop.costs.base_cost.BaseCostBase design cost.
Note that design costs are maximised by default. Change to minimising by setting the attribute minimising=True.
- Parameters:
target (str) – The name of the target variable.
- compute(y: dict, dy: numpy.ndarray | None = None) float[source]#
Returns the value of the cost variable.
- Parameters:
y (dict) – The dictionary of predictions with keys designating the output variables for fitting.
dy (np.ndarray, optional) – The corresponding gradient with respect to the parameters for each output variable. Note: not used in design optimisation classes.
- Returns:
The value of the output variable.
- Return type:
float