pybop.problems.fitting_problem#
Classes#
Problem class for fitting (parameter estimation) problems. |
Module Contents#
- class pybop.problems.fitting_problem.FittingProblem(model: pybop.BaseModel, parameters: pybop.parameters.parameter.Parameters, dataset: pybop.Dataset, check_model: bool = True, signal: list[str] | None = None, additional_variables: list[str] | None = None, initial_state: dict | None = None)[source]#
Bases:
pybop.BaseProblemProblem class for fitting (parameter estimation) problems.
Extends BaseProblem with specifics for fitting a model to a dataset.
- Parameters:
model (object) – The model to fit.
parameters (pybop.Parameter or pybop.Parameters) – An object or list of the parameters for the problem.
dataset (dictionary) – Dataset object containing the data to fit the model to.
check_model (bool, optional) – Flag to indicate if the model should be checked (default: True).
signal (str, optional) – The variable used for fitting (default: “Voltage [V]”).
additional_variables (list[str], optional) – Additional variables to observe and store in the solution (default additions are: [“Time [s]”]).
initial_state (dict, optional) – A valid initial state, e.g. the initial open-circuit voltage (default: None).
Attributes (Additional)
---------------------
dataset – The dictionary from a Dataset object containing the signal keys and values to fit the model to.
domain_data (np.ndarray) – The domain points in the dataset.
n_domain_data (int) – The number of domain points.
target (np.ndarray) – The target values of the signals.
- _evaluateEIS(inputs: pybop.parameters.parameter.Inputs, update_capacity=False) dict[str, numpy.ndarray[numpy.float64]][source]#
Evaluate the model with the given parameters and return the signal.
- Parameters:
inputs (Inputs) – Parameters for evaluation of the model.
- Returns:
y – The simulated model output y(ω) for the given inputs.
- Return type:
np.ndarray
- evaluate(inputs: pybop.parameters.parameter.Inputs, update_capacity=False) dict[str, numpy.ndarray[numpy.float64]][source]#
Evaluate the model with the given parameters and return the signal.
- Parameters:
inputs (Inputs) – Parameters for evaluation of the model.
- Returns:
y – The simulated model output y(t) for self.eis == False, and y(ω) for self.eis == True for the given inputs.
- Return type:
np.ndarray
- evaluateS1(inputs: pybop.parameters.parameter.Inputs)[source]#
Evaluate the model with the given parameters and return the signal and its derivatives.
- Parameters:
inputs (Inputs) – Parameters for evaluation of the model.
- Returns:
A tuple containing the simulation result y(t) as a dictionary and the sensitivities dy/dx(t) evaluated with given inputs.
- Return type:
tuple[dict, np.ndarray]