| 237 | } |
| 238 | |
| 239 | std::unordered_map<int, double> CopyToPredictMap(const std::vector<std::pair<int, double>>& features) { |
| 240 | std::unordered_map<int, double> buf; |
| 241 | int loop_size = static_cast<int>(features.size()); |
| 242 | for (int i = 0; i < loop_size; ++i) { |
| 243 | if (features[i].first < num_feature_) { |
| 244 | buf[features[i].first] = features[i].second; |
| 245 | } |
| 246 | } |
| 247 | return buf; |
| 248 | } |
| 249 | |
| 250 | /*! \brief Boosting model */ |
| 251 | const Boosting* boosting_; |