(DataPoint data)
| 129 | } |
| 130 | |
| 131 | public CategoricalResults classify(DataPoint data) |
| 132 | { |
| 133 | if(baseLearner == null) |
| 134 | throw new UntrainedModelException("Model has not yet been trained"); |
| 135 | double p = P(data); |
| 136 | |
| 137 | CategoricalResults cr = new CategoricalResults(2); |
| 138 | |
| 139 | cr.setProb(1, p); |
| 140 | cr.setProb(0, 1.0-p); |
| 141 | |
| 142 | return cr; |
| 143 | } |
| 144 | |
| 145 | public void trainC(ClassificationDataSet dataSet, ExecutorService threadPool) |
| 146 | { |