compute_obj

despasito.parameter_fitting.fit_functions.compute_obj

compute_obj(beadparams, fit_bead, fit_parameter_names, exp_dict, bounds, frozen_parameters=None)[source]

Fit defined parameters for equation of state object with given experimental data.

Each set of experimental data is converted to an object with the built-in ability to evaluate its part of objective function. To add another type of supported experimental data, see Parameter Fitting Features.

Parameters:
  • parameters_guess (numpy.ndarray,) – An array of initial guesses for parameters, these will be optimized throughout the process.

  • fit_bead (str) – Name of bead whose parameters are being fit.

  • fit_parameter_names (list[str]) – This list contains the name of the parameter being fit (e.g. epsilon). See EOS documentation for supported parameter names. Cross interaction parameter names should be composed of parameter name and the other bead type, separated by an underscore (e.g. epsilon_CO2).

  • exp_dict (dict) – Dictionary of experimental data objects.

  • bounds (list[tuple]) – List of length equal to fit_parameter_names with lists of pairs containing minimum and maximum bounds of parameters being fit. Defaults from Eos object are broad, so we recommend specification.

  • frozen_parameters (numpy.ndarray, Optional, default=None) – List of first parameters in the fit_parameter_names list that are frozen during minimization. This feature is currently used in the grid_minimization() method, enabled with the split_grid_minimization feature.

Returns:

Objective – Sum of objective values according to appropriate weights.

Return type:

float