1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-06-06 05:51:17 +08:00

Update xgb parameters.

This commit is contained in:
lwwang1995
2020-11-25 22:05:36 +08:00
parent 27f19c1f1b
commit f84cb64332
2 changed files with 10 additions and 15 deletions

View File

@@ -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

View File

@@ -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