use of org.apache.commons.math3.stat.descriptive.rank.Percentile.EstimationType in project knime-core by knime.
the class QuantileOperator method getResultInternal.
/**
* {@inheritDoc}
*/
@Override
protected DataCell getResultInternal() {
final double[] cells = super.getCells().getElements();
if (cells.length == 0) {
return DataType.getMissingCell();
}
double quantile = m_settings.getFunctionModel().getDoubleValue();
EstimationType estType = Percentile.EstimationType.valueOf(m_settings.getEstimationModel().getStringValue());
double evaluate = estType.evaluate(cells, quantile * 100, new KthSelector());
return new DoubleCell(evaluate);
}
Aggregations