public static LinearRegressionResult LinearRegression(
this IReadOnlyList<double> y,
IReadOnlyList<double> x
)
<ExtensionAttribute>
Public Shared Function LinearRegression (
y As IReadOnlyList(Of Double),
x As IReadOnlyList(Of Double)
) As LinearRegressionResult
public:
[ExtensionAttribute]
static LinearRegressionResult^ LinearRegression(
IReadOnlyList<double>^ y,
IReadOnlyList<double>^ x
)
[<ExtensionAttribute>]
static member LinearRegression :
y : IReadOnlyList<float> *
x : IReadOnlyList<float> -> LinearRegressionResult
Linear regression assumes that the data have been generated by a function y = a + b x + e, where e is normally distributed noise, and determines the values of a and b that best fit the data. It also determines a covariance matrix on the parameters a and b, and computes an ANOVA analysis of the fit.
ArgumentNullException | x or y is . |
DimensionMismatchException | x and y do not contain the same number of entries. |
InsufficientDataException | There are fewer than three data points. |