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

Function LGBM_BoosterUpdateOneIterCustom

src/c_api.cpp:1185–1201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1183}
1184
1185int LGBM_BoosterUpdateOneIterCustom(BoosterHandle handle,
1186 const float* grad,
1187 const float* hess,
1188 int* is_finished) {
1189 API_BEGIN();
1190 Booster* ref_booster = reinterpret_cast<Booster*>(handle);
1191 #ifdef SCORE_T_USE_DOUBLE
1192 Log::Fatal("Don't support custom loss function when SCORE_T_USE_DOUBLE is enabled");
1193 #else
1194 if (ref_booster->TrainOneIter(grad, hess)) {
1195 *is_finished = 1;
1196 } else {
1197 *is_finished = 0;
1198 }
1199 #endif
1200 API_END();
1201}
1202
1203int LGBM_BoosterUpdateOneIterCustom2(BoosterHandle handle,
1204 const float* grad,

Callers 1

Calls 1

TrainOneIterMethod · 0.45

Tested by

no test coverage detected