Methods

class fitterpp.Fitterpp(user_function, initial_params, data_df, method_names=None, max_fev=1000, num_latincube=None, latincube_idx=None, logger=None, is_collect=False)[source]

Implements an interface to parameter fitting methods that provides additional capabilities and bug fixes. The class also handles an oddity with lmfit that the final parameters returned may not be the best.

If latincube_idx is not None, then use a precomputed latin cube position.

Usage

fitter = fitterpp(calcResiduals, params, [cn.METHOD_LEASTSQ]) fitter.fit()

static Fitterpp.mkFitterppMethod(method_names=None, method_kwargs=None, max_fev=1000)[source]

Constructs an FitterppMethod Parameters ———- method_names: list-str/str method_kwargs: list-dict/dict

Returns

list-FitterppMethod

Fitterpp.report()[source]

Reports the result of an optimization.

Returns

str

Fitterpp.plotQuality(is_plot=True)[source]

Plots the quality results

Parameters

is_plot: bool (plot the output)

Returns

dict

key: method name value: list-float (residual sum of squares)

Fitterpp.plotPerformance(is_plot=True)[source]

Plots the statistics for running the objective function.

Parameters

is_plot: bool (plot the output)

Returns

pd.DataFrame
Columns

tot: total_times cnt: counts avg: averages

index: method