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

Method Refit

src/c_api.cpp:230–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228 }
229
230 void Refit(const int32_t* leaf_preds, int32_t nrow, int32_t ncol) {
231 std::lock_guard<std::mutex> lock(mutex_);
232 std::vector<std::vector<int32_t>> v_leaf_preds(nrow, std::vector<int32_t>(ncol, 0));
233 for (int i = 0; i < nrow; ++i) {
234 for (int j = 0; j < ncol; ++j) {
235 v_leaf_preds[i][j] = leaf_preds[i * ncol + j];
236 }
237 }
238 boosting_->RefitTree(v_leaf_preds);
239 }
240
241 bool TrainOneIter(const score_t* gradients, const score_t* hessians) {
242 std::lock_guard<std::mutex> lock(mutex_);

Callers 1

LGBM_BoosterRefitFunction · 0.45

Calls 1

RefitTreeMethod · 0.45

Tested by

no test coverage detected