Interpolation.LogitLinearCurve Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0

Overload List

LogitLinearCurve(Double[], Double[]) Creates a piecewise linear interpolating curve with logit transformation on the y-axis.
LogitLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>) Creates a piecewise linear interpolating curve with logit transformation on the y-axis.

LogitLinearCurve(Double[], Double[])

Creates a piecewise linear interpolating curve with logit transformation on the y-axis.
C#
public static PiecewiseInterpolatingCurve LogitLinearCurve(
	double[] xValues,
	double[] yValues
)

Parameters

xValues  Double[]
The x-coordinates of the data points. Must be strictly increasing.
yValues  Double[]
The y-coordinates of the data points. Must be in the range (0, 1).

Return Value

PiecewiseInterpolatingCurve
A PiecewiseInterpolatingCurve that interpolates linearly in logit(y) space.

Remarks

This method creates a curve that is linear in logit space, where logit(y) = log(y/(1-y)). This is useful for probability data and sigmoid-like relationships.

Exceptions

ArgumentNullExceptionxValues or yValues is null.
DimensionMismatchException The lengths of xValues and yValues do not match.
ArgumentExceptionyValues contains values outside the range (0, 1), or xValues is not strictly increasing.

LogitLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>)

Creates a piecewise linear interpolating curve with logit transformation on the y-axis.
C#
public static PiecewiseInterpolatingCurve LogitLinearCurve(
	ReadOnlySpan<double> xValues,
	ReadOnlySpan<double> yValues
)

Parameters

xValues  ReadOnlySpan<Double>
The x-coordinates of the data points. Must be strictly increasing.
yValues  ReadOnlySpan<Double>
The y-coordinates of the data points. Must be in the range (0, 1).

Return Value

PiecewiseInterpolatingCurve
A PiecewiseInterpolatingCurve that interpolates linearly in logit(y) space.

Remarks

This method creates a curve that is linear in logit space, where logit(y) = log(y/(1-y)). This is useful for probability data and sigmoid-like relationships.

Exceptions

DimensionMismatchException The lengths of xValues and yValues do not match.
ArgumentExceptionyValues contains values outside the range (0, 1), or xValues is not strictly increasing.

See Also