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

2.1.0 • Public • Published

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

/ml-regression-exponential/

    Package Sidebar

    Install

    npm i ml-regression-exponential

    Weekly Downloads

    16,792

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    9.74 kB

    Total Files

    8

    Last publish

    Collaborators

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