Extreme Optimization > User's Guide > Mathematics Library > Curve Fitting > Predefined Nonlinear Curves

Extreme Optimization User's Guide

User's Guide

Up: Curve Fitting Next: Solving Equations Previous: Nonlinear Curve Fitting Contents

Predefined Nonlinear Curves

Defining a nonlinear curve and calculating the partial derivatives can get quite complicated. For this reason, the Extreme Optimization Numerical Libraries for .NET provides a series of predefined nonlinear curves. Each class implements the ValueAt, SlopeAt, and FillPartialDerivatives methods.

The table below lists the pre-defined non-linear curve types:

Class Description
ExponentialCurve  A sum of exponential terms aeb.
FourParameterLogisticCurve The 4-parameter logistic function.
FiveParameterLogisticCurve  The 5-parameter logistic function with asymmetry factor.
GaussianCurve A 4-parameter Gaussian ('Bell') curve.
LorentzCurve A 4-parameter Lorentz peak curve.
RationalCurve A quotient of two polynomials.
SineCurve A 4-parameter periodic curve.
Table 1. Predefined nonlinear curves

These classes reside in the Extreme.Mathematics.Curves.Nonlinear namespace. A more detailed description of each curve type is given below. In the formulas, a parameter ai represents the parameter with index i in the curve's Parameters collection. For some curves, the individual parameters have a specific meaning, and the class implementing the curve has properties with descriptive names for these parameters. These properties are also listed where available.

Exponential Curves

An exponential curve is a curve that involves one or more exponential functions eax. There is immense variety in the exact definition of different exponential curves. The ExponentialCurve class represents a curve that is the sum of one or more exponential terms:

The constructor takes one integer parameter that specifies the number of terms in the curve. The curve has 2n parameters, where n is the number of terms.

Four Parameter Logistic Curve

A logistic curve is commonly used to represent growth processes.

A logistic curve is implemented by the FourParameterLogisticCurve class and has four parameters:

Index Property Description
0 InitialValue The value of the curve as x goes to zero.
1 FinalValue The value of the curve as x goes to infinity.
2 Center The halfway point in the transition from InitialValue to FinalValue.
3 HillSlope The Hill slope of the curve.
Table 2. 4-parameter logistic curve parameters

Five Parameter Logistic Curve

The four-parameter logistic curve is symmetrical in that the change from the initial value and the change towards the final value occur at roughly the same rate. When the data is not symmetrical in this way, the fitted curve may not be a good fit. The five-parameter logistic curve adds an asymmetry parameter that remedies this situation.

The 5 parameter logistic curve is implemented by the FiveParameterLogisticCurve class and has five parameters:

Index Property Description
0 InitialValue The value of the curve as x goes to zero.
1 FinalValue The value of the curve as x goes to infinity.
2 Center The halfway point in the transition from InitialValue to FinalValue.
3 HillSlope The Hill slope of the curve.
4 AsymmetryFactor The asymmetry factor.
Table 3. 5-parameter logistic curve parameters

Gaussian Curve

A Gaussian curve is one type of curve that is used to represent functions with a peak shape:

A Gaussian curve is implemented by the GaussianCurve class and has four parameters:

Index Property Description
0 Offset The value of the curve as x goes to infinity.
1 Center The location of the peak.
2 Width The width of the peak halfway between the baseline and the top of the peak.
3 Area The area between the curve and a horizontal line at y = Offset.
Table 4. Gaussian curve parameters

In addition, the GaussianCurve class has an Amplitude property that returns the difference between the function value at the peak and the baseline (Offset).

Lorentz Curve

A Lorentz curve is used to represent functions with a peak shape. The peak is sharper than the Gaussian curve.

A Lorentz curve is implemented by the LorentzCurve class and has four parameters:

Index Property Description
0 Offset The value of the curve as x goes to infinity.
1 Center The location of the peak.
2 Width The width of the peak halfway between the baseline and the top of the peak.
3 Area The area between the curve and a horizontal line at y = Offset.
Table 5. Lorentz curve parameters

In addition, the LorentzCurve class has an Amplitude property that returns the difference between the function value at the peak and the baseline (Offset).

Rational Curves

A rational curve is a curve that is the quotient of two polynomials. Multiplying both polynomials by a constant gives the same curve. To resolve this ambiguity, the constant term of the polynomial in the denominator is set to 1. A rational curve therefore has n+d+1 parameters, where n is the degree of the polynomial in the numerator, and d is the degree of the polynomial in the denominator:

The RationalCurve class implements this type of curve. The constructor takes two integer parameters: the degree of the polynomial in the numerator, and the degree of the polynomial in the denominator.

Sine Curve

A sine curve represents a periodic function.

A sine curve is implemented by the SineCurve class and has four parameters:

Index Property Description
0 Offset The mean value of the curve. The curve oscillates around this value.
1 Center The starting point of the oscillation.
2 Period The period of the curve.
3 Amplitude The amplitude of the curve.
Table 5. Sine curve parameters

Up: Curve Fitting Next: Solving Equations Previous: Nonlinear Curve Fitting Contents

Overview
Introduction
Features
Documentation
QuickStart Samples
Sample Applications
Downloads
Get it now!
Download trial version
How to Buy
Information
Resources
Contact Us
Search

"The Extreme Optimization Statistics Library for .NET is a major boon for those doing statistical work in .NET. I strongly recommend this product."
- Marc Brooks

"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.

This is a partial list of companies who are using our libraries:
ABB Robotics
Allstate
Applied Materials
Arcam
Astra Schedule
Babson College
Canadian Council on Learning
Canyon Associates
Caxton Associates
CECity
Constellation Energy
CreditSights
DeepOcean
Duke University
Dynamotive
Elecsoft
Engelhard Corporation
Epcor
Equipoise Software
Galileo International
GAM UK
Gammex
GlaxoSmithKline
Global Matrix
The Hartford
Infinera Corporation
Intel
JDS Uniphase
LaBranche & Co.
Learning & Skills Council
Jacobs Consultancy
Litman Gregory
Lucas Systems
Malvern Instruments
Medrio
Merck & Co.
Mintera.
Monitor Software
MorningStar
NanoString Technologies
Paletta Invent
Parametric Portfolio Associates
Prosanos
RATA Associates
RiskShield
Ramboll
Standard & Poor's
Strategic Analysis Corporation
Univ. of Alicante
Univ. of South Carolina
vielife
Xerox
US Army