multiregress

1.0.0 • Public • Published

multiregress

multiregress

Multiple linear regression.

How to use

Call regression function with datas. Regression function returns constant and coefficients.

const { regression } = require("../dist/index");
 
//data : [input_1, input_2, ... input_n, output]
//result : [const, coefficient_1, coefficient_2, ... coefficient_n]
 
//f(x) = 0.5x^2 - 0.5x
console.log(regression([[1, 1, 0], [2, 4, 1], [0, 0, 0]])); // ~ [0, -0.5, 0.5]

Dependents (0)

Package Sidebar

Install

npm i multiregress

Weekly Downloads

11

Version

1.0.0

License

Unlicense

Unpacked Size

4.32 kB

Total Files

5

Last publish

Collaborators

  • lunuy