Click or drag to resize
SimpleRegressionFit Method (Double, Double)
Least-Squares fitting the points (x,y) to a line y : x -> a+b*x, returning its best fitting parameters as (a, b) tuple, where a is the intercept and b the slope.

Namespace: MathNet.Numerics.LinearRegression
Assembly: MathNet.Numerics (in MathNet.Numerics.dll) Version: 3.7
Syntax
C#
public static Tuple<double, double> Fit(
	double[] x,
	double[] y
)

Parameters

x
Type: SystemDouble
Predictor (independent)
y
Type: SystemDouble
Response (dependent)

Return Value

Type: TupleDouble, Double
See Also