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, SlopeAt, and FillPartialDerivatives methods.

The table below lists the predefined non-linear curve types, organized by their primary applications:

Predefined nonlinear curves

Category

Class

Description

Oscillatory & Periodic

SineCurve

A 4-parameter periodic sine curve.

DampedSineCurve

A 5-parameter damped sinusoidal curve for oscillatory decay.

Peak / Line-Shape Models

GaussianCurve

A 4-parameter Gaussian 'bell' curve for symmetric peaks.

LorentzCurve

A 4-parameter Lorentzian peak curve.

LogNormalCurve

A 4-parameter log-normal distribution for skewed peaks.

ExponentiallyModifiedGaussianCurve

A 5-parameter curve for modeling skewed peaks in chromatography.

PseudoVoigtCurve

A 5-parameter mixed Gaussian-Lorentzian curve for spectroscopy.

Logistic & Dose–Response (Sigmoids)

FourParameterLogisticCurve

The 4-parameter logistic function for dose-response curves.

FiveParameterLogisticCurve

The 5-parameter logistic function with asymmetry factor.

HillEquationCurve

A 3-parameter curve for cooperative binding.

DoubleSigmoidCurve

A 6-parameter curve for processes that rise then fall.

Growth / Survival (CDF-like Sigmoids)

GompertzCurve

A 4-parameter asymmetric growth curve.

RichardsCurve

A 5-parameter flexible growth curve.

NormalCdfCurve

A 4-parameter normal CDF curve for step-like transitions.

WeibullCdfCurve

A 4-parameter cumulative Weibull distribution for reliability analysis.

Saturation & Kinetics

MichaelisMentenCurve

A 2-parameter curve for enzyme kinetics and saturation.

Monotonic Scaling & Decay Laws

ExponentialCurve

A sum of exponential terms.

PowerCurve

A 3-parameter power-law curve for scaling phenomena.

RationalCurve

A quotient of two polynomials.

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.

Sine Curve

A sine curve represents a periodic function.

The equation is:

f(x;y0,x0,T,A)=y0+Asin(π(xx0)T)

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

Sine curve parameters

Index

Parameter

Property

Description

0

y0

Offset

The mean value of the curve. The curve oscillates around this value.

1

x0

Center

The starting point of the oscillation.

2

T

Period

The period of the curve.

3

A

Amplitude

The amplitude of the curve.

Damped Sine Curve

A damped sine wave curve combines oscillatory behavior with exponential decay.

The equation is:

f(x;A,k,T,ϕ,C)=Aekxsin(2πxT+ϕ)+C

A damped sine wave curve is implemented by the DampedSineCurve class and takes five parameters:

Damped sine wave curve parameters

Index

Parameter

Property

Description

0

A

Amplitude

Initial amplitude (amplitude at x = 0).

1

k

DampingCoefficient

Damping coefficient (rate of exponential decay).

2

T

Period

Period (determines oscillation rate).

3

ϕ

PhaseOffset

Phase offset (horizontal shift of the oscillation).

4

C

Offset

Baseline offset (equilibrium position).

Gaussian Curve

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

The equation is:

f(x;y0,μ,w,A)=y0+A2wπexp(2(xμw)2)

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

Gaussian curve parameters

Index

Parameter

Property

Description

0

y0

Offset

The offset (value as x goes to infinity).

1

μ

Center

The location of the peak.

2

w

Width

The width of the peak halfway between the baseline and the top of the peak.

3

A

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.

The equation is:

f(x;y0,μ,w,A)=y0+2Aπw11+4(xμw)2

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

Lorentz curve parameters

Index

Parameter

Property

Description

0

y0

Offset

The offset (value as x goes to infinity).

1

μ

Center

The location of the peak.

2

w

Width

The width of the peak halfway between the baseline and the top of the peak.

3

A

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

Log-Normal Curve

A log-normal curve represents a right-skewed distribution commonly used in many fields. It is the probability density function of a log-normal distribution.

The equation is:

f(x;A,μ,σ,C)=Axσ2πexp((lnxμ)22σ2)+C

A log-normal curve is implemented by the LogNormalCurve class and takes four parameters:

Log-normal curve parameters

Index

Parameter

Property

Description

0

A

Amplitude

Amplitude or scaling factor.

1

μ

Median

Location parameter (median, mean of the logarithm).

2

σ

Scale

Scale parameter (standard deviation of the logarithm).

3

C

Offset

Offset offset.

Exponentially Modified Gaussian Curve

An Exponentially Modified Gaussian curve models skewed peaks commonly seen in chromatography.

The equation is:

f(x;A,μ,σ,τ,C)=A2τexp(σ22τ2xμτ)erfc(12[στxμσ])+C

An Exponentially Modified Gaussian curve is implemented by the ExponentiallyModifiedGaussianCurve class and takes five parameters:

Exponentially modified Gaussian curve parameters

Index

Parameter

Property

Description

0

A

Amplitude

Peak amplitude (total area under the curve).

1

μ

Center

Location parameter (relates to peak center).

2

σ

Width

Width parameter (Gaussian standard deviation).

3

τ

DecayTime

Exponential relaxation time (controls tailing).

4

C

Offset

Offset offset.

Pseudo-Voigt Curve

A Pseudo-Voigt curve is a linear combination of Gaussian and Lorentzian profiles used in spectroscopy.

The equation is:

f(x;A,μ,w,η,C)=A[(1η)G(x;μ,w)+ηL(x;μ,w)]+C

where G is a normalized Gaussian and L is a normalized Lorentzian. A Pseudo-Voigt curve is implemented by the PseudoVoigtCurve class and takes five parameters:

Pseudo-Voigt curve parameters

Index

Parameter

Property

Description

0

A

Amplitude

Peak amplitude (total area under the peak).

1

μ

Center

Peak center (position of maximum).

2

w

Width

Peak width (full width at half maximum).

3

η

MixingParameter

Mixing parameter (0 = pure Gaussian, 1 = pure Lorentzian).

4

C

Offset

Offset offset.

Four Parameter Logistic Curve

A logistic curve is commonly used to represent growth processes and dose-response relationships.

The equation is:

f(x;A1,A2,x0,p)=A2+A1A21+(x/x0)p

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

4-parameter logistic curve parameters

Index

Parameter

Property

Description

0

A1

InitialValue

The upper asymptote (value as x approaches zero).

1

A2

FinalValue

The lower asymptote (value as x approaches infinity).

2

x0

Center

The inflection point (halfway point in the transition from InitialValue to FinalValue).

3

p

HillSlope

The Hill slope (steepness parameter) 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.

The equation is:

f(x;A1,A2,x0,p,s)=A2+A1A2(1+(x/x0)p)s

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

5-parameter logistic curve parameters

Index

Parameter

Property

Description

0

A1

InitialValue

The upper asymptote (value as x approaches zero).

1

A2

FinalValue

The lower asymptote (value as x approaches infinity).

2

x0

Center

The inflection point (halfway point in the transition from InitialValue to FinalValue).

3

p

HillSlope

The Hill slope (steepness parameter).

4

s

AsymmetryFactor

The asymmetry factor (s = 1 reduces to 4PL).

Hill Curve

A Hill curve models cooperative binding and sigmoidal dose-response relationships.

The equation is:

f(x;Vmax,K,n)=VmaxxnKn+xn

A Hill curve is implemented by the HillEquationCurve class and takes three parameters:

Hill curve parameters

Index

Parameter

Property

Description

0

Vmax

VMax

Maximum response (asymptotic value as x → ∞).

1

K

K

Half-maximal concentration (x value at which y = Vmax/2).

2

n

HillCoefficient

Hill coefficient (cooperativity parameter).

Double Sigmoid Curve

A double sigmoid curve models processes that rise and then fall, creating a bell-shaped response.

The equation is:

f(x;A,k1,x1,k2,x2,C)=A[11+ek1(xx1)][111+ek2(xx2)]+C

A double sigmoid curve is implemented by the DoubleSigmoidCurve class and takes six parameters:

Double sigmoid curve parameters

Index

Parameter

Property

Description

0

A

Amplitude

Maximum amplitude (peak height above baseline).

1

k1

RisingHillSlope

Hill slope of the rising phase.

2

x1

RisingCenter

Midpoint of the rising phase.

3

k2

FallingHillSlope

Hill slope of the falling phase.

4

x2

FallingCenter

Midpoint of the falling phase.

5

C

Offset

Offset offset.

Gompertz Curve

A Gompertz curve models asymmetric growth processes.

The equation is:

f(x;A,b,c,C)=Aexp(becx)+C

A Gompertz curve is implemented by the GompertzCurve class and takes four parameters:

Gompertz curve parameters

Index

Parameter

Property

Description

0

A

Amplitude

Asymptotic amplitude (maximum value minus baseline).

1

b

Displacement

Displacement along the x-axis.

2

c

GrowthRate

Growth rate (controls the steepness).

3

C

Offset

Offset offset (lower asymptote).

Richards Curve

A Richards curve provides flexible modeling of growth processes with adjustable asymmetry.

The equation is:

f(x;A,ν,k,x0,C)=A(1+νek(xx0))1/ν+C

A Richards curve is implemented by the RichardsCurve class and takes five parameters:

Richards curve parameters

Index

Parameter

Property

Description

0

A

Amplitude

Upper asymptote (maximum value minus baseline).

1

ν

Shape

Shape parameter (controls asymmetry).

2

k

GrowthRate

Growth rate parameter.

3

x0

InflectionPoint

Inflection point location.

4

C

Offset

Offset offset (lower asymptote).

Normal CDF Curve

A normal CDF curve models smooth step-like transitions. It is the cumulative distribution function of the normal distribution.

The equation is:

f(x;A,μ,σ,C)=Aerf(xμσ2)+C

A normal CDF curve is implemented by the NormalCdfCurve class and takes four parameters:

Error function curve parameters

Index

Parameter

Property

Description

0

A

Amplitude

Amplitude (half the total change from minimum to maximum).

1

μ

Center

Center or inflection point (location of the transition).

2

σ

Width

Width parameter (controls the steepness of the transition).

3

C

Offset

Offset offset (vertical shift).

Weibull CDF Curve

A Weibull CDF curve models reliability and survival data. It is the cumulative distribution function of the Weibull distribution.

The equation is:

f(x;A,λ,k,C)=A(1e(x/λ)k)+C

A Weibull CDF curve is implemented by the WeibullCdfCurve class and takes four parameters:

Weibull CDF curve parameters

Index

Parameter

Property

Description

0

A

Amplitude

Amplitude (total change from baseline to asymptote).

1

λ

Scale

Scale parameter (characteristic life or 63.2nd percentile).

2

k

Shape

Shape parameter (determines failure rate behavior).

3

C

Offset

Offset offset.

Michaelis-Menten Curve

A Michaelis-Menten curve models enzyme kinetics and saturation processes.

The equation is:

f(x;Vmax,Km)=VmaxxKm+x

A Michaelis-Menten curve is implemented by the MichaelisMentenCurve class and takes two parameters:

Michaelis-Menten curve parameters

Index

Parameter

Property

Description

0

Vmax

VMax

Maximum reaction rate (asymptotic value as x → ∞).

1

Km

Km

Michaelis constant (substrate concentration at half-maximum rate).

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 equation is:

f(x;a0,b0,a1,b1,,an1,bn1)=i=0n1aiebix

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.

Power Curve

A power curve models scaling relationships and self-similar phenomena.

The equation is:

f(x;A,α,C)=Axα+C

A power curve is implemented by the PowerCurve class and takes three parameters:

Power curve parameters

Index

Parameter

Property

Description

0

A

Amplitude

Amplitude or scaling coefficient.

1

α

Exponent

Power-law exponent (often positive for decay).

2

C

Offset

Offset 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 equation is:

f(x;a0,a1,,an,b1,b2,,bd)=a0+a1x+a2x2++anxn1+b1x+b2x2++bdxd

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.