Example usage for org.apache.commons.math3.stat.descriptive.moment StandardDeviation setBiasCorrected

List of usage examples for org.apache.commons.math3.stat.descriptive.moment StandardDeviation setBiasCorrected

Introduction

In this page you can find the example usage for org.apache.commons.math3.stat.descriptive.moment StandardDeviation setBiasCorrected.

Prototype

public void setBiasCorrected(boolean isBiasCorrected) 

Source Link

Usage

From source file:org.jpmml.evaluator.functions.StandardDeviationFunction.java

static private Double evaluate(Collection<?> values, boolean biasCorrected) {
    StandardDeviation statistic = new StandardDeviation();
    statistic.setBiasCorrected(biasCorrected);

    for (Object value : values) {
        Double doubleValue = (Double) TypeUtil.parseOrCast(DataType.DOUBLE, value);

        statistic.increment(doubleValue);
    }/*from   www .  ja v a  2s . co m*/

    return statistic.getResult();
}