use of org.knime.base.data.aggregation.numerical.QuantileOperator in project knime-core by knime.
the class NumericOutliersIntervalsCalculator method getAggretators.
/**
* Creates column aggregators for each of the outlier columns.
*
* @param inSpec the input data table spec
* @param gSettings the global settings
* @return an array of column aggregators
*/
private ColumnAggregator[] getAggretators(final DataTableSpec inSpec, final GlobalSettings gSettings) {
final ColumnAggregator[] aggregators = new ColumnAggregator[m_outlierColNames.length * 2];
int pos = 0;
// for each outlier column name create the aggregators
for (final String outlierColName : m_outlierColNames) {
// the operator column settings
final OperatorColumnSettings cSettings = new OperatorColumnSettings(INCL_MISSING_CELLS, inSpec.getColumnSpec(outlierColName));
// setting
for (final double percentile : PERCENTILES) {
final AggregationMethod method;
if (m_useHeuristic) {
method = new PSquarePercentileOperator(gSettings, cSettings, 100 * percentile);
} else {
method = new QuantileOperator(new OperatorData("Quantile", true, false, DoubleValue.class, INCL_MISSING_CELLS), gSettings, cSettings, percentile, m_estimationType.name());
}
aggregators[pos++] = new ColumnAggregator(cSettings.getOriginalColSpec(), method);
}
}
// return the aggregators
return aggregators;
}
Aggregations