normalise

10.0.0 • Public • Published

normalise

Build Status Coverage Status Code Climate

Normalise data to [0, 1], i.e. feature scaling.

Install

npm i normalise

Usage

var Decimal = require('linear-arbitrary-precision')(require('floating-adapter'));
var normalise = require('normalise')(Decimal).normalise;
 
normalise([0, 5], 2.5); // => Decimal 0.5
normalise([1, 2], 3); // => Decimal 2
normalise([-5, 1], -3); // => Decimal 1/3

See spec.

Related projects

Package Sidebar

Install

npm i normalise

Weekly Downloads

99

Version

10.0.0

License

MIT

Last publish

Collaborators

  • javiercejudo