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:
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
Copyright 2004-2008,
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 Visual Studio Logo are registered trademarks of Microsoft Corporation