1.0.4 • Published 3 years ago

linearregressionjs v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

linear-regression-js

Library used to calculate a linear regression using an existing matrix with X and Y axis.

NPM version build status npm download

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.3076923076923078

License

[MIT](./LICENSE)
1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago