首页 > Web开发 > 详细

Apache Common Math Stat

时间:2017-02-14 13:25:46      阅读:244      评论:0      收藏:0      [点我收藏+]

http://commons.apache.org/proper/commons-math/userguide/stat.html

mark

 

DescriptiveStatistics maintains the input data in memory and has the capability of producing "rolling" statistics computed from a "window" consisting of the most recently added values.

SummaryStatistics does not store the input data values in memory, so the statistics included in this aggregate are limited to those that can be computed in one pass through the data without access to the full array of values.

 

如果不需要cache,one pass就可以算出来, 用SummaryStatistics

DescriptiveStatistics 会cache所有数据在memory,用于无法one pass算出来的,支持window和rolling

技术分享

SummaryStatistics can be aggregated using AggregateSummaryStatistics. This class can be used to concurrently gather statistics for multiple datasets as well as for a combined sample including all of the data.

MultivariateSummaryStatistics is similar to SummaryStatistics but handles n-tuple values instead of scalar values. It can also compute the full covariance matrix for the input data.

Neither DescriptiveStatistics nor SummaryStatistics is thread-safe. SynchronizedDescriptiveStatistics and SynchronizedSummaryStatistics, respectively, provide thread-safe versions for applications that require concurrent access to statistical aggregates by multiple threads.SynchronizedMultivariateSummaryStatistics provides thread-safe MultivariateSummaryStatistics.

There is also a utility class, StatUtils, that provides static methods for computing statistics directly from double[] arrays.

一些变体,

StatUtils可以方便的使用,

 

例子,看原文,很好懂

Apache Common Math Stat

原文:http://www.cnblogs.com/fxjwind/p/6397077.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!