Example usage for org.apache.commons.math.stat.descriptive DescriptiveStatisticsImpl DescriptiveStatisticsImpl

List of usage examples for org.apache.commons.math.stat.descriptive DescriptiveStatisticsImpl DescriptiveStatisticsImpl

Introduction

In this page you can find the example usage for org.apache.commons.math.stat.descriptive DescriptiveStatisticsImpl DescriptiveStatisticsImpl.

Prototype

public DescriptiveStatisticsImpl() 

Source Link

Document

Construct a DescriptiveStatisticsImpl with infinite window

Usage

From source file:edu.harvard.med.screensaver.analysis.heatmaps.HeatMap.java

private void initialize(Filter<Pair<WellKey, ResultValue>> scoringFilter,
        AggregateFunction<Double> scoringFunc) {

    Collection<Double> aggregationValues = new ArrayList<Double>();
    for (WellKey wellKey : _resultValues.keySet()) {
        if (wellKey.getPlateNumber() == _plateNumber) {
            ResultValue rv = getResultValue(wellKey.getRow(), wellKey.getColumn());
            if (rv != null && !scoringFilter.exclude(new Pair<WellKey, ResultValue>(wellKey, rv))) {
                aggregationValues.add(getRawValue(wellKey.getRow(), wellKey.getColumn()));
            }/*from w w w .  ja  va  2  s.  c  o  m*/
        }
    }

    scoringFunc.initializeAggregates(aggregationValues);

    _statistics = new DescriptiveStatisticsImpl();
    ResizableDoubleArray medianValues = new ResizableDoubleArray();
    for (Double rawValue : aggregationValues) {
        double scoredValue = scoringFunc.compute(rawValue);
        _statistics.addValue(scoredValue);
        medianValues.addElement(scoredValue);
    }

    _median = new Median().evaluate(medianValues.getElements());

    _scalableColorFunction.setLowerLimit(_statistics.getMin());
    _scalableColorFunction.setUpperLimit(_statistics.getMax());
}

From source file:org.ow2.clif.jenkins.chart.movingstatistics.MovingStdDevStat.java

@Override
public void resetMovingStat() {
    this.stat = new DescriptiveStatisticsImpl();
    this.n = 0;
}