ndarray-归一化
对 ndarray 进行归一化,使均值为 0,标准差为 1。
例子
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 ) )
这打印出来:
Before normalization: [ 124.04670674515125, 17677.59913617722 ]
After n
1