@Test
public void evaluateClassificationDefault(){

	TargetValue yesValue = new TargetValue()
		.setValue("yes")
		.setPriorProbability(1d / 7d);
	TargetValue noValue = new TargetValue()
		.setValue("no")
		.setPriorProbability(1d - NumberUtil.asDouble(yesValue.getPriorProbability()));
	Target target = new Target()
		.setField(null)
		.addTargetValues(yesValue, noValue);
	ModelEvaluator<?> evaluator = createTreeModelEvaluator(MiningFunction.CLASSIFICATION, MathContext.FLOAT, target);
	DataField dataField = evaluator.getDataField(target.getField());
	assertEquals(OpType.CATEGORICAL, dataField.getOpType());
	assertEquals(DataType.STRING, dataField.getDataType());
	Map<FieldName, ?> results = evaluator.evaluate(Collections.emptyMap());
	HasProbability hasProbability = (HasProbability)results.get(dataField.getName());
	assertEquals((Double)((double)(float)(1d / 7d)), hasProbability.getProbability("yes"));
	assertEquals((Double)((double)(float)(1d - (1d / 7d))), hasProbability.getProbability("no"));
	evaluator = createTreeModelEvaluator(MiningFunction.CLASSIFICATION, MathContext.DOUBLE, target);
	dataField = evaluator.getDataField(target.getField());
	assertEquals(OpType.CATEGORICAL, dataField.getOpType());
	assertEquals(DataType.STRING, dataField.getDataType());
	results = evaluator.evaluate(Collections.emptyMap());
	hasProbability = (HasProbability)results.get(dataField.getName());
	assertEquals(yesValue.getPriorProbability(), hasProbability.getProbability("yes"));
	assertEquals(noValue.getPriorProbability(), hasProbability.getProbability("no"));
}