Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ml-regression-theil-sen

mljs165.9kMIT3.0.0

Theil-Sen regression

readme

regression-theil-sen

NPM version build status npm download

Method for robust fitting a line to a set of points.

Installation

$ npm i ml-regression-theil-sen

Usage

import TheilSenRegression from "ml-regression-theil-sen";

var inputs = [1, 2, 3, 4, 5, 6, 7, 8, 9];
var outputs = [2, 3, 4, 20, 6, 7, 8, 9, 10];

var regression = new TheilSenRegression(inputs, outputs);
var y = regression.predict(85);

y === 85;
regression.toString(3) === "f(x) = x + 1.00";

API Documentation

The method is well explained on this article.

License

MIT

changelog

Changelog

3.0.0 (2024-05-16)

⚠ BREAKING CHANGES

  • update dependencies and remove default export

Miscellaneous Chores

  • update dependencies and remove default export (61007d5)

2.0.0 (2019-06-29)

chore

  • update dependencies and stop supporting Node.js 6 (5447baa)

BREAKING CHANGES

  • Node.js 6 is no longer supported.

1.0.0 (2017-06-21)

Migrated from regression