我看了医生,
import xgboost as xgb
class xgboost.XGBClassifier(max_depth=3, learning_rate=0.1,
n_estimators=100, silent=True, objective='binary:logistic',
booster='gbtree', n_jobs=1,nthread=None, gamma=0, min_child_weight=1,
max_delta_step=0, subsample=1, colsample_bytree=1, colsample_bylevel=1,
reg_alpha=0, reg_lambda=1, scale_pos_weight=1, base_score=0.5,
random_state=0, seed=None, missing=None, **kwargs)然后,我尝试按照API创建自己的实例。
model_benchmark=xgb.XGBClassifier(booster ='linear',objective='binary:logistic')我得到了:
TypeError: __init__() got an unexpected keyword argument 'booster'对如何选择我想要的助推器有什么建议吗?
发布于 2018-04-09 17:29:49
更新:
我检查了版本0.6的Github源代码,没有找到任何与助推器参数相关的内容。该参数在最新版本的发行版中。然而,在0.6版中也有一些关于Booster对象的信息,但是它可能比如何实现最新版本要复杂得多。
根据文档(api.html):
booster: string
Specify which booster to use: gbtree, gblinear or dart.没有“线性”,应该是“线性”。
发布于 2019-02-13 10:24:50
https://anaconda.org/conda-forge/py-xgboost
以上可以用于在带有助推器参数的Anaconda上安装0.80版本的xgboost。
https://stackoverflow.com/questions/49738295
复制相似问题