philips_supernote-obsidian-.../node_modules/ml-regression-robust-polynomial
Brandon Philips 2518e666d2 node_modules: initial import
Since there is no native code I am just checking all of the dependencies
in to simplify life and avoid a hard dependency on npm working on any
given day.
2024-04-05 23:08:52 -07:00
..
lib node_modules: initial import 2024-04-05 23:08:52 -07:00
src node_modules: initial import 2024-04-05 23:08:52 -07:00
LICENSE node_modules: initial import 2024-04-05 23:08:52 -07:00
package.json node_modules: initial import 2024-04-05 23:08:52 -07:00
README.md node_modules: initial import 2024-04-05 23:08:52 -07:00

regression-robust-polynomial

NPM version build status Test coverage npm download

Robust polynomial regression using LMedS.

This code is based on the implementation of this paper.

Installation

$ npm i ml-regression-robust-polynomial

Usage

import RobustPolynomialRegression from 'ml-regression-robust-polynomial';

var size = 30;
var x = new Array(size);
var y = new Array(size);
for (var i = 0; i < size; i++) {
  x[i] = i;
  y[i] = 2 * i * i + 4 * i + 5;
}
y[4] = y[4] * 100;
y[10] = y[10] * -100;

var regression = new RobustPolynomialRegression(x, y, 3);

regression.predict(3) === 35;

API Documentation

License

MIT