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

Package detail

ml-regression-exponential

mljs170.5kMIT3.0.2TypeScript support: included

Exponential Regression

readme

regression-exponential

NPM version build status npm download

Exponential Regression.

Installation

$ npm i ml-regression-exponential

Usage

This calculates parameters A and B for the equation y = B * e^(A * x).

import { ExponentialRegression } from 'ml-regression-exponential';

const x = [0, 1, 2, 3, 4];
const y = [1.5, 2.5, 3.5, 5.0, 7.5];

const regression = new ExponentialRegression(x, y);

regression.A; // 0.391202
regression.B; // 1.579909
regression.predict(2); // 3.454825
regression.toString(3); // f(x) = 1.58 * exp(0.391 * x)

License

MIT

changelog

Changelog

3.0.2 (2024-11-01)

Bug Fixes

  • add missing A and B in class type (#24) (1daf65e)

3.0.1 (2024-05-16)

Bug Fixes

  • TS definition was wrong (still the default) (e934626)

3.0.0 (2024-05-16)

⚠ BREAKING CHANGES

  • update dependencies and remove default export

Miscellaneous Chores

  • update dependencies and remove default export (6cd8877)

2.1.3 (2024-05-12)

Bug Fixes

  • add back CJS compat code from Rollup (#20) (dc55031)

2.1.2 (2024-05-05)

Bug Fixes

2.1.1 (2024-05-03)

Bug Fixes

2.1.0 (2021-05-10)

Features

  • update dependencies and add TS definition (b2d5a84)

2.0.0 (2019-06-29)

chore

  • update dependencies and remove support for Node.js 6 (807b41c)

BREAKING CHANGES

  • Node.js 6 is no longer supported.

1.0.1 (2017-04-28)

1.0.0 (2017-04-28)

Features

  • implement exponential regression (0718866)