Package Exports
- ml-array-normed
- ml-array-normed/lib-es6/index.js
- ml-array-normed/lib/index.js
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 (ml-array-normed) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
array-normed
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]