The General Polynomial Fitting Function in MKL
Hi,
I’m looking for a general Polynomial Fitting function in MKL, which is similar to Polyfit function from Matlab, OptiVec and Armadillo. This function uses two set of input data X and Y to determine the coefficients ai of a polynomial:
Pi = a0 + a1Xi + a2Xi2 ... anXin
Where,
χ2 = sum( 1/σi2 * (Pi - Yi)2 );
Is minimized.
I have searched MKL Data Fitting Library and found that all of routines are Spline-based. In MKL LAPACK library, I found some routines the Least Squares ones.
I understand that,
- as the order of the polynomial increases, Spline-based methods are preferable over polynomial interpolation because its interpolation error increases
- when the size of X and Y > the order of the polynomial increases, the Least Squares fit will be used
What I need, however, is a general Polynomial Fitting function described above. Is there such function and where can I find it in MKL (or IPP)?