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. linux每日命令(15):tail命令

    tail 命令从指定点开始将文件写到标准输出.使用tail命令的-f选项可以方便的查阅正在改变的日志文件,tail -f filename会把filename里最尾部的内容显示在屏幕上,并且不断刷新, ...

  2. yum只下载软件不安装的两种方法

    1 通过yum自带一个工具:yumdownloader rpm -qa |grep yum-utils yum -y install yum-utils* rpm -ql yum-utils 安装好后 ...

  3. ZeroMQ总结

    Socket types Thread safety: ZeroMQ的socket是非线程安全的,并且ZeroMQ本身不建议在多个线程中传递同一个Socket,即使保证了线程同步.   Socket ...

  4. CentOS服务器ntpdate同步

    如有多台CentOS服务器运行相同的服务,且对时间准确性要求较高,那必须保证多台服务器时间统一. 最简单的就是每台服务器都用ntpdate同步同一台网络时间服务器的时间. 1.输入ntpdate ti ...

  5. Mac 挂载树莓派nfs

    vim /etc/export /data_sda1/  192.168.1.*(rw,sync,insecure,no_root_squash) mac端自带rpcbind 挂载 sudo moun ...

  6. 仿迅雷播放器教程 -- 基于VLC的MFC播放器 (6)

        代码下载:http://download.csdn.net/detail/qq316293804/6409417   昨天的教程里写着预计MFC播放器会隔得久一点,但是今晚仔细看了下VLC的常 ...

  7. 利用Google开源Java容器化工具Jib构建镜像

    转载:https://blog.csdn.net/u012562943/article/details/80995373 一.前言 容器的出现让Java开发人员比以往任何时候都更接近“编写一次,到处运 ...

  8. [Bayes] dchisq: Metropolis-Hastings Algorithm

    dchisq gives the density,                          # 计算出分布下某值处的密度值 pchisq gives the distribution fun ...

  9. SpringBoot------Servlet3.0的注解自定义原生Servlet

    1.添加需要使用的依赖 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://w ...

  10. PS脚本博客

    http://blog.csdn.net/fzhlee/article/category/2718489