How to compute predict output according to the tree models exported before?
In regression, the output isn’t equal to the sum of every tree.
Like this,
params = {
‘booster’: ‘gbtree’,
‘objective’: ‘reg:gamma’, # 回归的损失函数,gmma回归
‘gamma’: 0.1,
‘max_depth’: 5,
‘lambda’: 2,
‘subsample’: 0.7,
‘colsample_bytree’: 0.7,
‘min_child_weight’: 3,
‘silent’: 1,
‘eta’: 0.1,
‘seed’: 1000,
‘nthread’: 4,
}
plst = params.items()
and the tree models are as following:
booster[0]:
0:leaf=0.0977716669
booster[1]:
0:leaf=0.0975570381
booster[2]:
0:leaf=0.0972924531
booster[3]:
0:leaf=0.0970089585
and the sum is about 0.4 but the prediction is about 0.7?
should I use eta when compute the sum?