Skip to content

javiercejudo/normalise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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