ml-array-normed
TypeScript icon, indicating that this package has built-in type declarations

1.3.7 • Public • Published

array-normed

NPM version npm download

Norme the vector (sum to 1 by default)

Installation

$ npm install --save ml-array-normed

Usage

import normed from 'ml-array-normed';

const result = normed([1, 2, 3, 4]);
// [0.1, 0.2, 0.3, 0.4]
import normed from 'ml-array-normed';

const result = normed([1, 2, 3, 4], {algorithm:'max'});
// [0.25, 0.5, 0.75, 1]
import normed from 'ml-array-normed';

const result = normed([1, 2, 3, 4], {algorithm:'max', maxValue: 100});
// [25, 50, 75, 100]

License

MIT

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i ml-array-normed

    Weekly Downloads

    890

    Version

    1.3.7

    License

    MIT

    Unpacked Size

    12 kB

    Total Files

    8

    Last publish

    Collaborators

    • cheminfo-bot
    • lpatiny
    • mljs-bot
    • stropitek
    • targos