pybop.costs.weighted_cost#
Classes#
A subclass for constructing a linear combination of cost functions as |
Module Contents#
- class pybop.costs.weighted_cost.WeightedCost(*costs, weights: list[float] | None = None)[source]#
Bases:
pybop.costs.base_cost.BaseCostA subclass for constructing a linear combination of cost functions as a single weighted cost function.
- Parameters:
costs (pybop.BaseCost) – The individual PyBOP cost objects.
weights (list[float]) – A list of values with which to weight the cost values.
- evaluate_batch(solution: list[pybop.simulators.solution.Solution], inputs: list[pybop.parameters.parameter.Inputs], calculate_sensitivities: bool = False) pybop.costs.evaluation.Evaluation[source]#
Computes the cost function for the given predictions.
- set_target(target: list[list[str]] | list[str] | str | None = None, dataset: pybop.processing.dataset.Dataset | None = None)[source]#
Set the target variable for all costs. Expecting a list of list[str] the same length as self.costs.
- _domain#
- costs#
- property target#