Predefined Nonlinear Curves

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

The table below lists the predefined non-linear curve types:

Predefined nonlinear curves

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.

These classes reside in the Numerics.NET.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:

Definition of an exponential curve.

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.

Definition of a 4 parameter logistic (4PL) curve.

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

4-parameter logistic curve 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.

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.

Definition of the 5 parameter logistic (5PL) curve.

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

5-parameter logistic curve 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.

Gaussian Curve

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

Definition of a Gaussian bell curve.

A Gaussian curve is implemented by the GaussianCurve class and takes four arguments:

Gaussian curve 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.

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 takes four arguments:

Lorentz curve 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.

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 takes four arguments:

Sine curve 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

Width

The period of the curve.

3

Amplitude

The amplitude of the curve.