Richards Curve Class
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.10.0
public class RichardsCurve : NonlinearCurve- Inheritance
- Object → Curve → NonlinearCurve → RichardsCurve
Remarks
Use the RichardsCurve class to represent a five-parameter Richards curve, also known as the generalized logistic curve. It provides a flexible family of sigmoidal curves that includes the logistic curve and approaches the Gompertz curve as a limit.
The Richards curve is widely used in growth modeling because it can accommodate asymmetric growth patterns through its positive shape parameter ν. When ν = 1, it reduces to the symmetric logistic curve. As ν approaches zero from above, it approaches the Gompertz curve. The case ν = 2 is asymmetric.
The equation is:
y(x) = A \left(1 + \nu e^{-k(x-x_0)}\right)^{-1/\nu} + CFor positive A, k, and ν, x₀ is the inflection point. At this point, y(x₀) = C + A * (1 + ν)^(-1/ν) and y'(x₀) = A * k * (1 + ν)^(-1/ν - 1). Thus ν = 1 gives value C + A/2 and slope A*k/4, while ν = 2 gives value C + A/sqrt(3) and slope A*k/(3*sqrt(3)).
As ν approaches zero from above, the limiting equation is y(x) = C + A * exp(-exp(-k * (x - x₀))). Its value and slope at x₀ are C + A/e and A*k/e. This is a limit for positive shape: setting Shape to exactly zero in this implementation returns the constant Offset with zero slope.
Parameters:
- A – Upper asymptote (maximum value minus baseline). See Amplitude.
- ν – Shape parameter (controls asymmetry). See Shape.
- k – Growth rate parameter. See GrowthRate.
- x₀ – Inflection point location. See InflectionPoint.
- C – Baseline offset (lower asymptote). See Offset.
Applications:
- Flexible growth modeling (population, tumor, crop)
- Pharmacokinetic dose-response with asymmetry
- Epidemic modeling with varied progression rates
- Product adoption curves
- Learning curves and skill acquisition
For details on how to fit a curve of this type, see the NonlinearCurveFitter class.
Constructors
| Richards | Constructs a new Richards curve. |
Properties
| Amplitude | Gets or sets the upper asymptote amplitude (A). |
| Growth | Gets or sets the growth rate (k). |
| Inflection | Gets or sets the inflection point location (x₀). |
| Offset | Gets or sets the baseline offset (C). |
| Parameters |
Gets the collection of parameters that determine the shape of this
Curve.
(Inherited from Curve) |
| Shape | Gets or sets the shape parameter (ν). |
Methods
| Clone |
Constructs an exact copy of this instance.
(Inherited from Curve) |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Fill |
Fills a dense vector with the partial derivatives of the curve with respect to
each of the curve parameters computed using numerical differentiation.
(Inherited from NonlinearCurve) |
| Fill |
Fills a dense vector with the partial derivatives of the curve with respect to
each of the curve parameters.
(Overrides NonlinearCurve.FillPartialDerivatives(Double, DenseVector<Double>)) |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
| Find |
Gets the set of X-coordinates where the curve crosses
the X-axis.
(Inherited from Curve) |
| Get |
Returns a CurveFitter object that can be used to fit the curve to data.
(Inherited from NonlinearCurve) |
| Get |
Returns a Curve that represents the derivative
of this Curve.
(Inherited from Curve) |
| Get | Serves as the default hash function. (Inherited from Object) |
| Get |
Returns a vector containing initial values for the parameters for a curve fit
through the specified data.
(Overrides NonlinearCurve.GetInitialFitParameters(Vector<Double>, Vector<Double>)) |
| Get |
Returns a vector with the partial derivatives
of the curve with respect to each of the curve parameters.
(Inherited from NonlinearCurve) |
| Get | Gets the Type of the current instance. (Inherited from Object) |
| Integral |
Gets the definite integral of the curve between the
specified X-coordinates.
(Inherited from Curve) |
| Memberwise | Creates a shallow copy of the current Object. (Inherited from Object) |
| OnParameter |
Called after a Curve parameter has been changed.
(Inherited from Curve) |
| OnParameter |
Called before the value of a curve parameter is changed.
(Inherited from Curve) |
| Set |
Sets a curve parameter to the specified value.
(Inherited from Curve) |
| Slope |
Gets the slopes of the curve at the specified X-coordinates.
(Inherited from Curve) |
| Slope |
Gets the slope of the curve at the specified X-coordinate.
(Overrides Curve.SlopeAt(Double)) |
| Slope |
Gets the slopes of the curve at the specified X-coordinates.
(Inherited from Curve) |
| Slope |
Gets the slopes of the curve at the specified X-coordinates.
(Inherited from Curve) |
| Slope |
Gets the slopes of the curve at the specified X-coordinates.
(Inherited from Curve) |
| Solve( |
Finds the x value where the curve reaches the specified y value.
(Inherited from Curve) |
| Solve( |
Finds the x value where the curve reaches the specified y value
within a bracketing interval.
(Inherited from Curve) |
| Tangent |
Gets the tangent line to the curve at the
specified X-coordinate.
(Inherited from Curve) |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
| Value |
Gets the Y-values of the curve at the specified X-coordinates.
(Inherited from Curve) |
| Value |
Gets the Y-value of the curve at the specified X-coordinate.
(Overrides Curve.ValueAt(Double)) |
| Value |
Gets the Y-values of the curve at the specified X-coordinates.
(Inherited from Curve) |
| Value |
Gets the Y-values of the curve at the specified X-coordinates.
(Inherited from Curve) |
| Value |
Gets the Y-values of the curve at the specified X-coordinates.
(Inherited from Curve) |