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的更多相关文章

  1. apache commons math 示例代码

    apache commons Math是一组偏向科学计算为主的函数,主要是针对线性代数,数学分析,概率和统计等方面. 我虽然是数学专业毕业,当年也是抱着<数学分析>啃,但是好久不用,这些概 ...

  2. Apache Common DbUtils

    前段时间使用了Apache Common DbUtils这个工具,在此留个印,以备不时查看.大家都知道现在市面上的数据库访问层的框架很多,当然很多都是包含了OR-Mapping工作步骤的 例如大家常用 ...

  3. apache common包下的StringUtils的join方法

    apache common包下的StringUtils的join方法: 关键字:java string array join public static String join(Iterator it ...

  4. org.apache.common.io-FileUtils详解

    org.apache.common.io---FileUtils详解 getTempDirectoryPath():返回临时目录路径; public static String getTempDire ...

  5. Common lang一些边界方法总结(好记性不如烂笔头,需要慢慢积累).一定要利用好现有的轮子,例如Apache common与Google Guava

    好记性真是不如烂笔头啊!!!! 如下代码: List<String> list = new ArrayList<String>(); list.add("1" ...

  6. WEB文件上传之apache common upload使用(一)

    文件上传一个经常用到的功能,它有许多中实现的方案. 页面表单 + RFC1897规范 + http协议上传 页面控件(flash/html5/activeX/applet) + RFC1897规范 + ...

  7. Error: org.apache.mahout.math.CardinalityException: Required cardinality 10 but got 30问题解决办法

    问题详情 在运行mahout中kmeans算法时,采取的是其默认输入路径/user/hadoop/testdata 和 默认输出路径/user/hadoop/output. [hadoop@djt00 ...

  8. Android中使用Apache common ftp进行下载文件

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/birdsaction/article/details/36379201 在Android使用ftp下 ...

  9. apache common pool2原理与实战

    完整源码,请帮我点个star哦! 原文地址为https://www.cnblogs.com/haixiang/p/14783955.html,转载请注明出处! 简介 对象池顾名思义就是存放对象的池,与 ...

随机推荐

  1. 每日英语:Dashing the China Dream

    Much has been said about what the 'China Dream' really means to many Chinese -- whether it is nation ...

  2. python修饰器(装饰器)以及wraps

    Python装饰器(decorator)是在程序开发中经常使用到的功能,合理使用装饰器,能让我们的程序如虎添翼. 装饰器的引入 初期及问题的诞生 假如现在在一个公司,有A B C三个业务部门,还有S一 ...

  3. 【转】ubuntu16.04设置python3为默认及一些库的安装

    原文:https://www.cnblogs.com/jokie/p/6933546.html Ubuntu默认Python为2.7,所以安装Python包时安装的为py2的包. 利用alternat ...

  4. openssl实现CA自签证书和颁发数字证书

    1. 测试环境准备: CA签署服务器:192.168.2.181 WEB服务器:192.168.2.180 CA安装openssl  WEB服务器使用nginx 2. CA生成自签证书: 2.1 为C ...

  5. zookeeper 入门(二)

    上一篇教程中重点讲解了如何部署启动一台zookeeper服务 本章中我们会重点讲解下如何 部署一套zookeeper的集群环境 基于paxos 算法,部署一套集群环境要求 至少 要有3个节点  并且节 ...

  6. JPA 不生成外键

    在用jpa这种orm框架时,有时我们实体对象存在关联关系,但实际的业务场景可能不需要用jpa来控制数据库创建数据表之间的关联约束,这时我们就需要消除掉数据库表与表之间的外键关联.但jpa在处理建立外键 ...

  7. java程序员必须要学会的linux命令总结

    1.查找文件find / -name filename.txt 根据名称查找/目录下的filename.txt文件.find . -name “*.xml” 递归查找所有的xml文件2.查看一个程序是 ...

  8. php文件缓存方法总结

    为大家分享很全的php文件缓存,供大家参考,具体内容如下 <?php class cache {  private static $_instance = null;    protected ...

  9. springboot logback 集成

    在 application.yml 中敲 logging.pattern.consle ,IDEA 会联想到对应的值.单击属性就可以跳到 LoggingApplicationListener.java ...

  10. Invoke和BeginInvoke理解

    在Invoke或者BeginInvoke的使用中无一例外地使用了委托Delegate,至于委托的本质请参考我的另一随笔:对.net事件的看法. 一.为什么Control类提供了Invoke和Begin ...