Click or drag to resize

QuickLinearRegressionGetRelativeYBetweenRegressions Method

Gets the relative distance of a point (x, y) between two regression lines.

Namespace: Altaxo.Calc.Regression
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public static double GetRelativeYBetweenRegressions(
	QuickLinearRegression a,
	QuickLinearRegression b,
	double x,
	double y
)

Parameters

a  QuickLinearRegression
The first regression line.
b  QuickLinearRegression
The second regression line.
x  Double
The x value of the point.
y  Double
The y value of the point.

Return Value

Double
The relative y value. If the point (x, y) is located on regression line a, then 0 is returned. If the point (x, y) is located on regression line b, then 1 is returned. If the point is between the two regression lines, a value between 0 and 1 is returned. The value is not clamped to the interval [0, 1]. Thus, if the point is outside the two regression lines, a value less than 0 or greater than 1 may be returned.
See Also