madgui.util.fit module¶
Utilities for fitting objective functions.
Functions
|
Fit objective function |
|
Compute reduced chi-squared. |
|
Global optimization of |
|
Global optimization of |
|
Fit objective function |
|
Fit objective function |
|
Fit objective function |
|
Single least squares fit for |
|
Compute jacobian |
-
madgui.util.fit.
fit
(f, x0, algorithm='minimize', **kwargs) → scipy.optimize.optimize.OptimizeResult[source]¶ Fit objective function
f(x) = y
, start fromx0
. Returnsscipy.optimize.OptimizeResult
.
-
madgui.util.fit.
fit_basinhopping
(f, x0, iterations=20, T=1.0, stepsize=0.01, **kwargs)[source]¶ Global optimization of
f(x) = y
based onscipy.optimize.basinhopping()
.
-
madgui.util.fit.
fit_diffevo
(f, x0, delta=0.001, bounds=None, iterations=20, method='best1bin', **kwargs)[source]¶ Global optimization of
f(x) = y
based onscipy.optimize.differential_evolution()
.
-
madgui.util.fit.
fit_lstsq
(f, x0, jac=None, tol=1e-08, delta=None, iterations=None, callback=None, rcond=0.01, lstsq=None)[source]¶ Fit objective function
f(x) = y
using a naive repeated linear least-squares fit.
-
madgui.util.fit.
fit_lstsq_oneshot
(lstsq, f, x0, y0=None, delta=None, jac=None, rcond=1e-08)[source]¶ Single least squares fit for
f(x) = y
aroundx0
. Returns(Δx, Δy)
, whereΔy
is the linear hypothesis for how muchy
will change due to change inx
.
-
madgui.util.fit.
fit_minimize
(f, x0, iterations=None, **kwargs)[source]¶ Fit objective function
f(x) = y
using least-squares fit viascipy.optimize.minimize
.
-
madgui.util.fit.
fit_svd
(f, x0, jac=None, tol=1e-08, delta=None, iterations=None, callback=None, rcond=0.01)[source]¶ Fit objective function
f(x) = y
using a naive repeated linear least-squares fit using the svd-based pseudo inverse.