Chapter 31. Fitting Polynomials (.NET, C#, CSharp, VB, Visual Basic, F#)
As described in Chapter 8, the CenterSpace.NMath.Core namespace includes classes for calculating least squares fits of linear functions to a set of points. In addition, the CenterSpace.NMath.Analysis namespace provides class PolynomialLeastSquares, which performs a least squares fit of a Polynomial to a set of points.
This chapter describes how to use class PolynomialLeastSquares.
NOTE—For testing the goodness of fit of PolynomialLeastSquares fits, see class GoodnessOfFit in the NMath Stats library. Available statistics include the residual standard error, the coefficient of determination (R2 and "adjusted" R2), the F-statistic for the overall model with its numerator and denominator degrees of freedom, and standard errors, t-statistics, and corresponding (two-sided) p-values for the model parameters.