typeRegistry.addType(new ClassifierType());
typeRegistry.addType(new RegressorType());
typeRegistry.addType(new ModelType());
metadata.addFunctions(new MLFunctionFactory(typeRegistry).listFunctions());
InternalAggregationFunction aggregation = metadata.getExactFunction(new Signature("evaluate_classifier_predictions", StandardTypes.VARCHAR, StandardTypes.BIGINT, StandardTypes.BIGINT)).getAggregationFunction();
Accumulator accumulator = aggregation.bind(ImmutableList.of(0, 1), Optional.<Integer>absent(), Optional.<Integer>absent(), 1.0).createAccumulator();
accumulator.addInput(getPage());
Block block = accumulator.evaluateFinal();
String output = VARCHAR.getSlice(block, 0).toStringUtf8();
List<String> parts = ImmutableList.copyOf(Splitter.on('\n').split(output));
assertEquals(parts.size(), 3);
assertEquals(parts.get(0), "Accuracy: 1/2 (50.00%)");