| 343 | |
| 344 | template <class Container> |
| 345 | inline |
| 346 | double |
| 347 | DecisionTree<Container>::predict_response( |
| 348 | MappedIntegerVector cat_features, |
| 349 | MappedColumnVector con_features) const { |
| 350 | ColumnVector curr_prediction = predict(cat_features, con_features); |
| 351 | |
| 352 | if (is_regression){ |
| 353 | return curr_prediction(0); |
| 354 | } else { |
| 355 | Index max_label; |
| 356 | curr_prediction.maxCoeff(&max_label); |
| 357 | return static_cast<double>(max_label); |
| 358 | } |
| 359 | } |
| 360 | // ------------------------------------------------------------ |
| 361 | |
| 362 | template <class Container> |