Data Fit
- class pbparam.DataFit(simulation, data, parameters, variables_to_fit=['Voltage [V]'], cost_function=<pbparam.cost_functions.rmse.RMSE object>, weights=None, solve_options=None)[source]
A class to define an optimisation problem.
- Parameters:
simulation (
pybamm.Simulation) – The simulation to be run to fit to datadata (
pandas.DataFrame) – The experimental or reference data to be used in optimisation of simulation parameters.parameters (dict) – The parameters to be optimised. They should be provided as a dictionary where the keys are the names of the variables to be optimised and the values are a tuple with the initial guesses and the lower and upper bounds of the optimisation. If a key is a list of strings then all the variables in the list will take the same value.
variables_to_fit (str or list of str (optional)) – The variable or variables to optimise in the cost function. The default is “Voltage [V]”. It can be a string or a list of strings.
weights (dict (optional)) – The custom weights of individual variables. Default is 1 for all variables. It can be int or list of int that has same length with the data.
cost_function (
pbparam.BaseCostFunction) – Cost function class to be used in minimisation algorithm. The default is Root-Mean Square Error. It can be selected from pre-defined built-in functions or defined explicitly.solve_options (dict (optional)) – A dictionary of options to pass to the simulation. The default is None.