philips_supernote-obsidian-.../node_modules/ml-regression-exponential
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
History.md 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-exponential.d.ts node_modules: initial import 2024-04-05 23:08:52 -07:00

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 = A * e^(B * 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