| 201 | } |
| 202 | |
| 203 | void Application::Train() { |
| 204 | Log::Info("Started training..."); |
| 205 | boosting_->Train(config_.snapshot_freq, config_.output_model); |
| 206 | boosting_->SaveModelToFile(0, -1, config_.output_model.c_str()); |
| 207 | // convert model to if-else statement code |
| 208 | if (config_.convert_model_language == std::string("cpp")) { |
| 209 | boosting_->SaveModelToIfElse(-1, config_.convert_model.c_str()); |
| 210 | } |
| 211 | Log::Info("Finished training"); |
| 212 | } |
| 213 | |
| 214 | void Application::Predict() { |
| 215 | if (config_.task == TaskType::KRefitTree) { |
nothing calls this directly
no test coverage detected