ml-regression-multivariate-linear
Multivariate linear regression. [edited for Angular 2+ usage]
Installation
npm install --save ngx-regression-multivariate-linear
See ml-regression-multivariate-linear )
API (new MLR(x, y[, options])
Arguments
x
: Matrix containing the inputsy
: Matrix containing the outputs
Options
intercept
: boolean indicating if intercept terms should be computed (default: true)statistics
: boolean for calculating and returning regression statistics (default: true)
Usage
; const x = 0 0 1 2 2 3 3 4;// Y0 = X0 * 2, Y1 = X1 * 2, Y2 = X0 + X1const y = 0 0 0 2 4 3 4 6 5 6 8 7;const mlr = x y;console;// [6, 6, 6]