JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 25
  • Score
    100M100P100Q80158F
  • License MIT

Normalise data to [0, 1]

Package Exports

  • normalise

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (normalise) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

normalise

Build Status Coverage Status Code Climate

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

Install

npm i normalise

Usage

var normalise = require('normalise').normalise;

normalise(2.5, [0, 5]); // => 0.5
normalise(3, [1, 2]); // => 2
normalise(-3, [-5, 1]); // => 1/3

normalise(Math.E); // => Math.E

normalise(-3, 'invalid scale'); // => RescaleError

See spec.