AggregateFunctions { public static Double percentile(NumericColumn<?> data, Double percentile) { return StatUtils.percentile(removeMissing(data), percentile); } private  AggregateFunctions(); static Double percentile(NumericColumn<?> data, Double percentile); static Double meanDifference(NumericColumn<?> column1, NumericColumn<?> column2); static Double sumDifference(NumericColumn<?> column1, NumericColumn<?> column2); static final DateTimeAggregateFunction earliestDateTime; static final DateAggregateFunction earliestDate; static final DateAggregateFunction latestDate; static final DateTimeAggregateFunction latestDateTime; static final InstantAggregateFunction maxInstant; static final InstantAggregateFunction minInstant; static final BooleanCountFunction countTrue; static final BooleanAggregateFunction allTrue; static final BooleanAggregateFunction anyTrue; static final BooleanAggregateFunction noneTrue; static final BooleanCountFunction countFalse; static final BooleanNumericFunction proportionTrue; static final BooleanNumericFunction proportionFalse; static final NumericAggregateFunction first; static final NumericAggregateFunction last; static final NumericAggregateFunction change; static final NumericAggregateFunction pctChange; static final CountFunction countNonMissing; static final CountFunction count; static final CountFunction countMissing; static final CountFunction countUnique; static final NumericAggregateFunction mean; static final NumericAggregateFunction cv; static final NumericAggregateFunction sum; static final NumericAggregateFunction median; static final CountFunction countWithMissing; static final NumericAggregateFunction quartile1; static final NumericAggregateFunction quartile3; static final NumericAggregateFunction percentile90; static final NumericAggregateFunction percentile95; static final NumericAggregateFunction percentile99; static final NumericAggregateFunction range; static final NumericAggregateFunction min; static final NumericAggregateFunction max; static final NumericAggregateFunction product; static final NumericAggregateFunction geometricMean; static final NumericAggregateFunction populationVariance; static final NumericAggregateFunction quadraticMean; static final NumericAggregateFunction kurtosis; static final NumericAggregateFunction skewness; static final NumericAggregateFunction sumOfSquares; static final NumericAggregateFunction sumOfLogs; static final NumericAggregateFunction variance; static final NumericAggregateFunction stdDev; @Deprecated static final NumericAggregateFunction standardDeviation; }
@Test void testPercentileFunctions() { double[] values = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; DoubleColumn c = DoubleColumn.create("test", values); c.appendCell(""); assertEquals(1, countMissing.summarize(c), 0.0001); assertEquals(11, countWithMissing.summarize(c), 0.0001); assertEquals(StatUtils.percentile(values, 90), percentile90.summarize(c), 0.0001); assertEquals(StatUtils.percentile(values, 95), percentile95.summarize(c), 0.0001); assertEquals(StatUtils.percentile(values, 99), percentile99.summarize(c), 0.0001); assertEquals(10, countUnique.summarize(c), 0.0001); }