| 199 | }; |
| 200 | |
| 201 | inline FeatureMap LoadFeatureMap(std::string const& uri) { |
| 202 | FeatureMap feat; |
| 203 | if (uri.size() != 0) { |
| 204 | std::unique_ptr<dmlc::Stream> fs(dmlc::Stream::Create(uri.c_str(), "r")); |
| 205 | dmlc::istream is(fs.get()); |
| 206 | feat.LoadText(is); |
| 207 | } |
| 208 | return feat; |
| 209 | } |
| 210 | |
| 211 | inline void GenerateFeatureMap(Learner const *learner, |
| 212 | std::vector<Json> const &custom_feature_names, |
no test coverage detected