Scala StatCounter类

34 篇文章 0 订阅

Scala StatCounter

1.Instance Constructors

new StatCounter() //初始化StatCounter()
new StatCounter(values:TraversableOnce[Double])
//用给定的值实例化StatCounter,TranversableOnce我觉得相当于是个迭代器,指针只能从前往后查看一遍(不能逆行)

2.Value Members

def copy():StatCounter
//Clone this StatCounter

def count:Long

def max:Double

def mean:Double

重点方法:merge()

def merge(other:StatCounter):StatCounter
//Merge another StatCounter into this one, adding up the internal statistics.
添加内部统计。

def merge(values:TraversableOnce[Double]):StatCounter
Add multiple values into this StatCounter, updating the internal statistics.

def merge(value:Double) :StatCounter
Add a value into this StatCounter, updating the internal statistics.
def min:Double

def sampleStdev:Double
//如果数据是从总体中取出来的样本,计算出的标准差就是样本标准差
Return the sample standard deviation of the values, 
which corrects for bias in estimating the variance by dividing by N-1 instead of N.

def sampleVariance:Double
Return the sample variance, which corrects for bias in estimating the variance by dividing by N-1 insteading of N.

def stdev:Double 
Return the standard deviation of the values.

def sum:Double

def toString():String

def variance:Double
Return the variance of the values.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值