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

Function LGBM_BoosterUpdateOneIterCustom2

src/c_api.cpp:1203–1221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1201}
1202
1203int LGBM_BoosterUpdateOneIterCustom2(BoosterHandle handle,
1204 const float* grad,
1205 const float* hess,
1206 const float* grad2,
1207 const float* hess2,
1208 int* is_finished) {
1209 API_BEGIN();
1210 Booster* ref_booster = reinterpret_cast<Booster*>(handle);
1211 #ifdef SCORE_T_USE_DOUBLE
1212 Log::Fatal("Don't support custom loss function when SCORE_T_USE_DOUBLE is enabled");
1213 #else
1214 if (ref_booster->TrainOneIter_new(grad, hess, grad2, hess2)) {
1215 *is_finished = 1;
1216 } else {
1217 *is_finished = 0;
1218 }
1219 #endif
1220 API_END();
1221}
1222
1223int LGBM_BoosterRollbackOneIter(BoosterHandle handle) {
1224 API_BEGIN();

Callers

nothing calls this directly

Calls 1

TrainOneIter_newMethod · 0.45

Tested by

no test coverage detected