line function

Tuple2<double, double> line (List<double> x, List<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 array, where a is the intercept and b the slope.

Implementation

Tuple2<double, double> line(List<double> x, List<double> y) => fit(x, y);