| 88 | } |
| 89 | |
| 90 | void GBDT::PredictLeafIndexByMap(const std::unordered_map<int, double>& features, double* output) const { |
| 91 | int total_tree = num_iteration_for_pred_ * num_tree_per_iteration_; |
| 92 | for (int i = 0; i < total_tree; ++i) { |
| 93 | output[i] = models_[i]->PredictLeafIndexByMap(features); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | } // namespace LightGBM |