Normalizes an ndarray to zero mean and unit variance
JavaScript
Permalink
Failed to load latest commit information.
example adding files May 15, 2013
test adding files May 15, 2013
.gitignore adding files May 15, 2013
.npmignore upgrade to 1.0 Jun 26, 2013
LICENSE adding files May 15, 2013
README.md adding files May 15, 2013
normalize.js upgrade to 1.0 Jun 26, 2013
package.json fix up deps, add cwise as bfy transform Jun 2, 2015

README.md

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