Namespaces

Types in MathNet.Numerics.LinearRegression

Type SimpleRegression

Namespace MathNet.Numerics.LinearRegression

Static Functions

Public Static Functions

ValueTuple<double, double> Fit(Double[] x, Double[] y)

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.
Parameters
Double[] x

Predictor (independent)

Double[] y

Response (dependent)

ValueTuple<double, double> Fit(IEnumerable<Tuple<double, double>> samples)

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.
Parameters
IEnumerable<Tuple<double, double>> samples

Predictor-Response samples as tuples

double FitThroughOrigin(Double[] x, Double[] y)

Least-Squares fitting the points (x,y) to a line y : x -> b*x, returning its best fitting parameter b, where the intercept is zero and b the slope.
Parameters
Double[] x

Predictor (independent)

Double[] y

Response (dependent)

double FitThroughOrigin(IEnumerable<Tuple<double, double>> samples)

Least-Squares fitting the points (x,y) to a line y : x -> b*x, returning its best fitting parameter b, where the intercept is zero and b the slope.
Parameters
IEnumerable<Tuple<double, double>> samples

Predictor-Response samples as tuples