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.libMathAssembly: 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
)
Public Shared Function LinearRegression (
X As IEnumerable(Of Double),
Y As IEnumerable(Of Double),
ForceThroughX As Double,
ForceThroughY As Double
) As FittingLinearRegressionResult
Dim X As IEnumerable(Of Double)
Dim Y As IEnumerable(Of Double)
Dim ForceThroughX As Double
Dim ForceThroughY As Double
Dim returnValue As FittingLinearRegressionResult
returnValue = Fitting.LinearRegression(X,
Y, ForceThroughX, 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
FittingLinearRegressionResultThe regression result as a
FittingLinearRegressionResultSee Also