fancytools.fit package¶
Submodules¶
fancytools.fit.fit2dArrayToFn module¶
-
fancytools.fit.fit2dArrayToFn.fit2dArrayToFn(arr, fn, mask=None, down_scale_factor=1, output_shape=None, guess=None)[source]¶ Fit a 2d array to a 2d function
*Ignore masked values * [down_scale_factor] map to speed up fitting procedure * [output_shape] shape of the output array * [guess] must be scaled using [scale_factor]
Returns: Fitted map, fitting params (scaled), error
fancytools.fit.linregressIgnoringOutliers module¶
fancytools.fit.polyFitIgnoringOutliers module¶
-
fancytools.fit.polyFitIgnoringOutliers.polyFitIgnoringOutliers(x, y, deg=2, niter=3, nstd=2)[source]¶ Returns: callable function of polynomal fit excluding all outliers
Return type: (np.poly1d)
Parameters: - deg (int) – degree of polynomal fit
- n_iter (int) – do linear regression n times successive removing
- nstd (float) – exclude outlioers, if their deviation is > [nstd] * standard deviation