Collective2 Explorer
Collective2 Explorer
MathNet.Numerics Namespaces
MathNet.Numerics.LinearRegression
SimpleRegression Class
SimpleRegression Methods
Fit Method
Fit Method (IEnumerable(Tuple(Double, Double)))
Fit Method (Double[], Double[])
SimpleRegression
Fit Method (IEnumerable
Tuple
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#
Copy
public
static
Tuple
<
double
,
double
>
Fit
(
IEnumerable
<
Tuple
<
double
,
double
>>
samples
)
Parameters
samples
Type:
System.Collections.Generic
IEnumerable
Tuple
Double
,
Double
Predictor-Response samples as tuples
Return Value
Type:
Tuple
Double
,
Double
See Also
Reference
SimpleRegression Class
Fit Overload
MathNet.Numerics.LinearRegression Namespace