| 294 | |
| 295 | |
| 296 | @Override |
| 297 | public CategoricalResults classify(DataPoint data) |
| 298 | { |
| 299 | if(data.numNumericalValues() != root.stump.numNumeric() || data.numCategoricalValues() != root.stump.numCategorical()) |
| 300 | throw new ModelMismatchException("Tree expected " + root.stump.numNumeric() + " numeric and " + |
| 301 | root.stump.numCategorical() + " categorical features, instead received data with " + |
| 302 | data.numNumericalValues() + " and " + data.numCategoricalValues() + " features respectively"); |
| 303 | return root.classify(data); |
| 304 | } |
| 305 | |
| 306 | @Override |
| 307 | public void trainC(ClassificationDataSet dataSet, ExecutorService threadPool) |