Search in sources :

Example 1 with KthSelector

use of org.apache.commons.math3.util.KthSelector 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);
}
Also used : DoubleCell(org.knime.core.data.def.DoubleCell) KthSelector(org.apache.commons.math3.util.KthSelector) EstimationType(org.apache.commons.math3.stat.descriptive.rank.Percentile.EstimationType)

Aggregations

EstimationType (org.apache.commons.math3.stat.descriptive.rank.Percentile.EstimationType)1 KthSelector (org.apache.commons.math3.util.KthSelector)1 DoubleCell (org.knime.core.data.def.DoubleCell)1