Package Exports
- linearregressionjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (linearregressionjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
linear-regression-js
Library used to calculate a linear regression using an existing matrix with X and Y axis.
Linear Regression
Installation
$ npm install --save linear-regression-js
Usage
import LinearRegression from 'linear-regression-js';
const matrix = [[1, 2, 3, 4, 5], [3, 4, 2, 4, 5]];
const regression = new LinearRegression(matrix);
const serie = regression.calculate(); // [[1, 2, 3, 4, 5], [2.8, 3.2, 3.6, 4.0, 4.4]]
const r2 = regression.getR2(); // 0.3076923076923078License
[MIT](./LICENSE)