}
@Test
public void testPredictTrace() throws Exception {
// build tree
DecisionTreeBuilder builder = new DecisionTreeBuilder();
builder.setM(data.getDataset().nbAttributes() - 1);
Node tree = builder.build(rng, data);
String[] prediction = TreeVisualizer.predictTrace(tree, testData, ATTR_NAMES);
Assert.assertArrayEquals(prediction, new String[] {
"outlook = rainy -> windy = TRUE -> no", "outlook = overcast -> yes",
"outlook = sunny -> (humidity = 90) >= 85 -> no"});