1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-09 14:00:55 +08:00

Add backtest example to online simulation (#984)

This commit is contained in:
you-n-g
2022-03-19 01:53:14 +08:00
committed by GitHub
parent 8efc8b92ef
commit b7988e6428
3 changed files with 43 additions and 10 deletions

View File

@@ -71,6 +71,7 @@ class LGBModel(ModelFT, LightGBMFInt):
early_stopping_callback = lgb.early_stopping(
self.early_stopping_rounds if early_stopping_rounds is None else early_stopping_rounds
)
# NOTE: if you encounter error here. Please upgrade your lightgbm
verbose_eval_callback = lgb.log_evaluation(period=verbose_eval)
evals_result_callback = lgb.record_evaluation(evals_result)
self.model = lgb.train(