class_docstr: LightGBM Model for high frequency prediction
class_docstr_tok: ["LightGBM","Model","for","high","frequency","prediction"]
code: def fit(
      self,
      dataset: DatasetH,
      num_boost_round=1000,
      early_stopping_rounds=50,
      verbose_eval=20,
      evals_result=None,
  ):
      if evals_result is None:
          evals_result = dict()
      dtrain, dvalid = self._prepare_data(dataset)
      early_stopping_callback = lgb.early_stopping(
          early_stopping_rounds
      )
      verbose_eval_callback = lgb.log_evaluation(period=verbose_eval)
      evals_result_callback = lgb.record_evaluation(evals_result)
      self.model = lgb.train(
          self.params,
          dtrain,
          num_boost_round=num_boost_round,
          valid_sets=[dtrain, dvalid],
          valid_names=["train", "valid"],
          callbacks=[
              early_stopping_callback,
              verbose_eval_callback,
              evals_result_callback,
          ],
      )
      evals_result["train"] = list(evals_result["train"].values())[0]
      evals_result["valid"] = list(evals_result["valid"].values())[0]
  
file_path: qlib/qlib/contrib/model/highfreq_gdbt_model.py
imports: import warnings
  import numpy
  import pandas
  import lightgbm
  from ...model.base import ModelFT
  from ...data.dataset import DatasetH
  from ...data.dataset.handler import DataHandlerLP
  from ...model.interpret.base import LightGBMFInt
label_desc: Use image node_id 5 for calling the HFLGBModel obj's underlying member method code with example usage: obj.fit(dataset, num_boost_round, early_stopping_rounds, verbose_eval, evals_result) without return types