Home»Documentation»Mathematics Library User's Guide»Curve Fitting

## Curve Fitting | Extreme Optimization Numerical Libraries for .NET Professional |

Curve fitting is the process of finding a curve from a set of curves that best matches a series of data points. The set of curves is defined in terms of curve parameters. In other words, curve fitting consists of finding the curve parameters that produce the best match.

There are different ways to determine what is the 'best' match. If the curve has to go through the data points, we have interpolation. In least squares curve fitting, the sum of the squares of the residuals (the difference between the data value and the value predicted by the curve) is minimized. In weighted least squares, each data point is assigned a weight that indicates how much the data point influences the parameters.

A further distinction is made between linear and
nonlinear least squares. In the context of curve fitting,
a linear curve is a curve that is linear in its parameters.
This is regardless of whether the terms are linear in the
curve variable. For example, a quadratic curve,
y = ax^{2}+bx+c,
is linear in the parameters a, b,
and c, even though it is nonlinear
in terms of x.
On the other hand, the exponential curve
y = ae^{bx}
is linear in a, but nonlinear in b.

The **Extreme Optimization Numerical Libraries for .NET**
contains classes for linear and nonlinear least squares curve fitting.

In this section:

Copyright Â© 2004-2023,
Extreme Optimization. All rights reserved.

*Extreme Optimization,* *Complexity made simple*, *M#*, and *M
Sharp* are trademarks of ExoAnalytics Inc.

*Microsoft*, *Visual C#, Visual Basic, Visual Studio*, *Visual
Studio.NET*, and the *Optimized for Visual Studio* logo

are
registered trademarks of Microsoft Corporation.