mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-14 16:26:55 +08:00
Update xgb parameters.
This commit is contained in:
@@ -29,18 +29,15 @@ task:
|
|||||||
class: XGBModel
|
class: XGBModel
|
||||||
module_path: qlib.contrib.model.xgboost
|
module_path: qlib.contrib.model.xgboost
|
||||||
kwargs:
|
kwargs:
|
||||||
objective: reg:linear
|
eval_metric: rmse
|
||||||
n_estimators: 5000
|
colsample_bytree: 0.5
|
||||||
colsample_bytree: 0.85
|
eta: 0.2
|
||||||
learning_rate: 0.0421
|
gamma: 0.55
|
||||||
subsample: 0.8789
|
max_depth: 2
|
||||||
max_depth: 8
|
min_child_weight: 1.0
|
||||||
num_leaves: 210
|
n_estimators: 647
|
||||||
num_threads: 20
|
subsample: 0.8
|
||||||
missing: -1
|
|
||||||
min_child_weight: 1
|
|
||||||
nthread: 4
|
nthread: 4
|
||||||
tree_method: hist
|
|
||||||
dataset:
|
dataset:
|
||||||
class: DatasetH
|
class: DatasetH
|
||||||
module_path: qlib.data.dataset
|
module_path: qlib.data.dataset
|
||||||
|
|||||||
@@ -22,10 +22,8 @@ from ...data.dataset.handler import DataHandlerLP
|
|||||||
class XGBModel(Model):
|
class XGBModel(Model):
|
||||||
"""XGBModel Model"""
|
"""XGBModel Model"""
|
||||||
|
|
||||||
def __init__(self, obj="mse", **kwargs):
|
def __init__(self, **kwargs):
|
||||||
if obj not in {"mse", "binary"}:
|
self._params = {}
|
||||||
raise NotImplementedError
|
|
||||||
self._params = {"obj": obj}
|
|
||||||
self._params.update(kwargs)
|
self._params.update(kwargs)
|
||||||
self.model = None
|
self.model = None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user