| 155 | } |
| 156 | |
| 157 | void GBDT::Boosting() { |
| 158 | if (objective_function_ == nullptr) { |
| 159 | Log::Fatal("No object function provided"); |
| 160 | } |
| 161 | // objective function will calculate gradients and hessians |
| 162 | int64_t num_score = 0; |
| 163 | objective_function_-> |
| 164 | GetGradients(GetTrainingScore(&num_score), gradients_.data(), hessians_.data()); |
| 165 | } |
| 166 | |
| 167 | data_size_t GBDT::BaggingHelper(Random* cur_rand, data_size_t start, data_size_t cnt, data_size_t* buffer) { |
| 168 | if (cnt <= 0) { |
nothing calls this directly
no test coverage detected