MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / CopyToPredictMap

Method CopyToPredictMap

src/application/predictor.hpp:239–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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_;

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected