JSPM

ndarray-normalize

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

Normalizes an ndarray to zero mean and unit variance

Package Exports

  • ndarray-normalize

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 (ndarray-normalize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ndarray-normalize

Normalizes an ndarray so that the mean is 0 and the standard deviation is 1.

Example

var moments = require("ndarray-moments")
var lena = require("luminance")(require("lena"))

console.log("Before normalization:", moments(2, lena))

require("ndarray-normalize")(lena)

console.log("After normalization:", moments(2, lena))

This prints out:

Before normalization: [ 124.04670674515125, 17677.59913617722 ]
After normalization: [ -7.130396703039932e-14, 1.0000000000002789 ]

Install

npm install ndarray-normalize

require("ndarray-normalize")(output, input)

Normalizes an ndarray

  • output gets the result
  • input is the array that gets normalized (if unspecified, output is normalized in place)

Returns output

Credits

(c) 2013 Mikola Lysenko. MIT License