ml-regression-robust-polynomial
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

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

/ml-regression-robust-polynomial/

    Package Sidebar

    Install

    npm i ml-regression-robust-polynomial

    Weekly Downloads

    14,731

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    49.8 kB

    Total Files

    58

    Last publish

    Collaborators

    • stropitek
    • targos
    • lpatiny
    • mljs-bot
    • maasencioh
    • andcastillo