1028
京東網上商城
Apache Common Math Stat
Apache Common Math Stat
https://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
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 andSynchronizedSummaryStatistics, respectively, provide thread-safe versions for applications that require concurrent access to statistical aggregates by multiple threads.SynchronizedMultivariateSummaryStatistics provides thread-safeMultivariateSummaryStatistics.
There is also a utility class, StatUtils, that provides static methods for computing statistics directly from double[] arrays.
一些變體,
有StatUtils可以方便的使用,
最後更新:2017-04-07 21:23:50