diff --git a/examples/benchmarks/XGBoost/workflow_config_xgboost.yaml b/examples/benchmarks/XGBoost/workflow_config_xgboost.yaml index 407d56fb7..31eee8206 100644 --- a/examples/benchmarks/XGBoost/workflow_config_xgboost.yaml +++ b/examples/benchmarks/XGBoost/workflow_config_xgboost.yaml @@ -29,18 +29,15 @@ task: class: XGBModel module_path: qlib.contrib.model.xgboost kwargs: - objective: reg:linear - n_estimators: 5000 - colsample_bytree: 0.85 - learning_rate: 0.0421 - subsample: 0.8789 - max_depth: 8 - num_leaves: 210 - num_threads: 20 - missing: -1 - min_child_weight: 1 + eval_metric: rmse + colsample_bytree: 0.5 + eta: 0.2 + gamma: 0.55 + max_depth: 2 + min_child_weight: 1.0 + n_estimators: 647 + subsample: 0.8 nthread: 4 - tree_method: hist dataset: class: DatasetH module_path: qlib.data.dataset diff --git a/qlib/contrib/model/xgboost.py b/qlib/contrib/model/xgboost.py index b45e12e10..039fd2c80 100755 --- a/qlib/contrib/model/xgboost.py +++ b/qlib/contrib/model/xgboost.py @@ -22,10 +22,8 @@ from ...data.dataset.handler import DataHandlerLP class XGBModel(Model): """XGBModel Model""" - def __init__(self, obj="mse", **kwargs): - if obj not in {"mse", "binary"}: - raise NotImplementedError - self._params = {"obj": obj} + def __init__(self, **kwargs): + self._params = {} self._params.update(kwargs) self.model = None