【文件属性】:
文件名称:mean:计算算术平均值
文件大小:19KB
文件格式:ZIP
更新时间:2021-05-31 11:45:26
JavaScript
吝啬的
计算。
定义为
其中x_0, x_1,...,x_{N-1}是单个数据值, N是数据集中值的总数。
安装
$ npm install compute-mean
用法
var mean = require ( 'compute-mean' ) ;
均值( x[, 选项] )
计算。 x可以是 、或 。
var data , mu ;
data = [ 2 , 4 , 5 , 3 , 8 , 2 ] ;
mu = mean ( data ) ;
// returns 4
data = new Int8Array ( data ) ;
mu = mean ( data ) ;
// returns 4
非数值arrays ,提供一个访问function访问array值。
var data = [
{ 'x' : 2 } ,
{ 'x' : 4 } ,
{ 'x'
【文件预览】:
mean-master
----.jshintrc(1KB)
----.gitattributes(12B)
----.jshintignore(118B)
----lib()
--------validate.js(2KB)
--------accessor.js(566B)
--------matrix.js(1KB)
--------index.js(2KB)
--------array.js(565B)
----.npmignore(498B)
----examples()
--------index.js(1KB)
----TODO.md(10B)
----.travis.yml(156B)
----LICENSE(1KB)
----test()
--------test.validate.js(2KB)
--------test.js(3KB)
--------test.accessor.js(903B)
--------test.matrix.js(2KB)
--------test.array.js(709B)
----README.md(7KB)
----Makefile(2KB)
----docs()
--------img()
----.editorconfig(169B)
----.gitignore(711B)
----package.json(2KB)