Click or drag to resize

FittingLinearRegression(IEnumerableDouble, IEnumerableDouble, Double, Double) Method

Calculates the ordinary least squares linear regression for the given X and Y data. Forces the line to pass through the ForceThroughX and ForceThroughY coordinates.

Namespace: RelaxIS_SDK.libMath
Assembly: RelaxIS SDK (in RelaxIS SDK.dll) Version: 3.0.23.63
Syntax
public static FittingLinearRegressionResult LinearRegression(
	IEnumerable<double> X,
	IEnumerable<double> Y,
	double ForceThroughX,
	double ForceThroughY
)

Parameters

X  IEnumerableDouble
The X data. It should be the same length as Y.
Y  IEnumerableDouble
The Y data. It should be the same length as X.
ForceThroughX  Double
The X coordinate of the point the line should pass through.
ForceThroughY  Double
The Y coordinate of the point the line should pass through.

Return Value

FittingLinearRegressionResult
The regression result as a FittingLinearRegressionResult
See Also