class AccuracyAggregator implements CombinerAggregator<AccuracyState<L>> {

	@Override
	public AccuracyState<L> init(TridentTuple tuple) {
		Instance<L> instance = (Instance<L>) tuple.getValue(0);
		L prediction = (L) tuple.getValue(1);
		L expected = instance.getLabel();

		boolean equals = Objects.equals(expected, prediction);

		AccuracyState<L> state = new AccuracyState<L>(1, equals ? 0 : 1);
		return state;
	}

}