1.0.0 • Published 4 years ago

multiregress v1.0.0

Weekly downloads
2
License
Unlicense
Repository
github
Last release
4 years ago

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]