Overview
Solutions
Detailed Features
Documentation
QuickStart Samples
Sample Applications
Downloads
Get it now!
Download trial version
How to Buy
Testimonials

"The de facto-standard library for linear algebra on the .NET platform is the Extreme Optimization Library."
  - Jon Harrop, author, F# for Scientists

"I have yet to see another package that offers the depth of statistical analysis that Extreme Optimization does, and I must say that I'm impressed with the level of service I've experienced."
  - Henry Oh, RBC Capital Markets

"I have made it my mission to institutionalize the value of good API design.  I strongly believe that this is key to making developers more productive and happy on our platform. It is clear that you value good API design in your work, and take to heart developer productivity and synergy with the .NET framework."
- Brad Abrams,
Lead Program Manager, Microsoft.

More testimonials

Version 8.1

Supports .NET 7.0 and earlier. Try it for free with our fully functional 30-day trial version.

nuget

Get from Nuget

Solutions

Curve Fitting

Whether you're using C#, Visual Basic (VB.NET), F#, IronPython, the Extreme Optimization Numerical Libraries for .NET make it easy to include curve fitting functionality in your .NET applications. The Extreme Optimization Numerical Libraries for .NET are a complete math, vector/matrix and statistics package for the Microsoft .NET framework. Curve fitting features include:

  • Interpolation using polynomials, cubic splines, piecewise constant and linear curves.
  • Linear least squares fit using polynomials, Chebyshev polynomials, or arbitrary functions.
  • Nonlinear least squares using predefined functions or your own.
  • Predefined nonlinear curves: exponential, rational, Gaussian, Lorentz, 4 and 5 parameter logistic.
  • Weighted least squares, with 4 predefined weight functions.
  • Scaling of curve parameters.
  • Constraints on curve parameters.
  • Confidence and prediction bands New!

Curve fitting classes

The classes that implement the curve fitting functionality live in the Extreme.Mathematics.Curves namespace. The principal classes are:

Curve Fitting Algorithms

  • LinearCurveFitter Represents an algorithm that calculates a linear least squares fit of a curve.
  • NonlinearCurveFitter Represents an algorithm that fits a nonlinear curve to data.
  • LevenbergMarquardtOptimizer Implements the Levenberg-Marquardt algorithm for non-linear least-squares.
  • WeightFunctions Contains a set of standard weight functions that can be used in linear and nonlinear curve fitting.

Curve objects

  • Curve Represents a curve in two-dimensional space. This is the abstract base class of all curve objects.
  • ParameterCollection Represents the set of parameters that determine the shape of a particular type of Curve.
  • Polynomial Represents a polynomial.
  • ChebyshevSeries Represents a Chebyshev polynomial series.
  • CubicSpline Represents a cubic spline curve.
  • GeneralCurve Represents a curve in two-dimensional space whose value is defined by a RealFunction delegate.
  • NonlinearCurve Represents a Curve that can be used for a non-linear regression calculation.

The Curve Fitting section of the Mathematics Library User's Guide explains their use in detail.

Curve Fitting Sample Application

With only a few lines of code, you can fit data points to a set of arbitrary functions. This sample shows you how.

For more information, click on the image to the right. This sample is also part of our trial version.

Curve fitting QuickStart Samples

Our library comes with a large number of QuickStart samples that help you to get started in minutes. The following samples illustrate how to use the curve fitting functionality:

Project Description View source
LinearCurveFitting Illustrates curve fitting of polynomials and arbitrary linear functions using linear least squares. C# VB.NET
NonlinearCurveFitting Illustrates curve fitting of nonlinear functions using nonlinear least squares. C# VB.NET

Trial version

If you would like to evaluate the Extreme Optimization Numerical Libraries for .NET, you can download a free, fully functional 60-day trial version. In addition to the code samples discussed here, it includes about 70 other samples as well as complete documentation for the entire library.