Click or drag to resize
SimpleRegressionFit Method (IEnumerableTupleDouble, 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(
	IEnumerable<Tuple<double, double>> samples
)

Parameters

samples
Type: System.Collections.GenericIEnumerableTupleDouble, Double
Predictor-Response samples as tuples

Return Value

Type: TupleDouble, Double
See Also