import { linearRegression } from "https://deno.land/x/simplestatistics@v7.8.0/index.js";
Simple linear regression is a simple way to find a fitted line between a set of coordinates. This algorithm finds the slope and y-intercept of a regression line using the least sum of squares.
Examples
linearRegression([[0, 0], [1, 1]]); // => { m: 1, b: 0 }
linearRegression([[0, 0], [1, 1]]); // => { m: 1, b: 0 }