grid_minimization
despasito.parameter_fitting.global_methods.grid_minimization
- grid_minimization(parameters_guess, bounds, fit_bead, fit_parameter_names, exp_dict, global_opts={}, minimizer_opts={}, constraints=None)[source]
Fit defined parameters for equation of state object using a custom adaptation of scipy.optimize.brute with given experimental data.
- Parameters:
parameters_guess (numpy.ndarray) – An array of initial guesses for parameters.
bounds (list[tuple]) – List of length equal to fit_parameter_names with lists of pairs for minimum and maximum bounds of parameter being fit. Defaults from Eos object are broad, so we recommend specification.
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.
global_opts (dict, Optional, default={}) –
Ns (int) - Optional, default=5, Number of grid points along the axes
finish (callable) - Optional, default=scipy.optimize.minimize, A minimization
function - initial_guesses (list) - Optional, Replaces grid of values generated with bounds and Ns - split_grid_minimization (int) - Optional, default=0, Choose index of first parameter to fit, while the grid is formed from those before. For example, if 4 parameters are defined and
split_grid_minimization==2, then a grid is formed for the first two parametersparameters_guess[:2], and the remaining parameters,parameters_guess[2:]are minimized.minimizer_opts (dict, Optional, default={}) – Dictionary used to define minimization type and the associated options.
method (str) - Optional, default=”least_squares”, Method available to our
solve_root()function - options (dict) - Optional, default={}, This dictionary contains the kwargs available to the chosen methodconstraints (dict, Optional, default=None) – This dictionary of constraint types and their arguments will be converted into a tuple of constraint classes that is compatible
- Returns:
Objective – scipy OptimizedResult object
- Return type:
obj