Package: scikits.fitting
Fitting SciKitA framework for fitting functions to data with SciPy which unifies the various
available interpolation methods and provides a common interface to them based
on the following simple methods:Fitter.__init__(p): set parameters of interpolation function, e.g. polynomial degreeFitter.fit(x, y): fit given input-output dataFitter.__call__(x)orFitter.eval(x): evaluate function on new input dataEach interpolation routine falls in one of two categories: scatter fitting or
grid fitting. They share the same interface, only differing in the definition
of input datax.Scatter-fitters operate on unstructured scattered input data (i.e. not on a
grid). The input data consists of a sequence ofxcoordinates and a sequence
of correspondingydata, where the order of thexcoordinates does not
matter and their location can be arbitrary. Thexcoordinates can have an
arbritrary dimension (although most classes are specialised for 1-D or 2-D
data). If the dimension is bigger than 1, the coordinates are provided as an
array of column vectors. These fitters haveScatterFitas base class.Grid-fitters operate on input data that lie on a grid. The input data consists
of a sequence of x-axis tick sequences and the corresponding array ofydata. These fitters haveGridFitas base class.The module is organised as follows:Scatter fittersScatterFit: Abstract base class for scatter fittersLinearLeastSquaresFit: Fit linear regression model to data using SVDPolynomial1DFit: Fit polynomial to 1-D dataPolynomial2DFit: Fit polynomial to 2-D dataPiecewisePolynomial1DFit: Fit piecewise polynomial to 1-D dataIndependent1DFit: Interpolate N-dimensional matrix along given axisDelaunay2DScatterFit: Interpolate scalar function of 2-D data, based on
Delaunay triangulation and cubic / linear interpolationNonLinearLeastSquaresFit: Fit a generic function to data, based on
non-linear least squares optimisationGaussianFit: Fit Gaussian curve to multi-dimensional dataSpline1DFit: Fit a B-spline to 1-D dataSpline2DScatterFit: Fit a B-spline to scattered 2-D dataRbfScatterFit: Do radial basis function (RBF) interpolationGrid fittersGridFit: Abstract base class for grid fittersSpline2DGridFit: Fit a B-spline to 2-D data on a rectangular gridHelper functionssquash: Flatten array, but not necessarily all the way to a 1-D arrayunsquash: Restore an array that was reshaped bysquashsort_grid: Ensure that the coordinates of a rectangular grid are in
ascending orderdesort_grid: Undo the effect ofsort_gridvectorize_fit_func: Factory that creates vectorised version of
function to be fitted to datarandomise: Randomise fitted function parameters by resampling residualsSourcehttps://github.com/ska-sa/scikits.fittingContactLudwig Schwardt <ludwig at ska.ac.za>History0.7.2 (2023-10-10)Remove distutils and move to pkgutil-style namespace package (#12)Remove run_module_suite function (a nose leftover) (#11)0.7.1 (2023-09-21)Fix deprecated NumPy type alias (np.float) (#10)0.7 (2018-09-20)Python 3 support (#8)Clean up tests and more flake8 (line lengths) (#9)0.6 (2016-12-05)Fix pip installation, clean up setup procedure, flake8 and add README (#3)PiecewisePolynomial1DFit updated to work with scipy 0.18.0 (#4)Delaunay2DScatterFit now based on scipy.interpolate.griddata, which is
orders of magnitude faster, more robust and smoother. Its default
interpolation changed from ‘nn’ (natural neighbours - no longer available)
to ‘cubic’. (#5)Delaunay2DGridFit removed as there is no equivalent anymore (#5)0.5.1 (2012-10-29)Use proper name for np.linalg.LinAlgError0.5 (2011-09-26)Initial release of scikits.fitting