Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/363.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在XGB5分级机中设置增压器_Python_Machine Learning_Scikit Learn_Xgboost - Fatal编程技术网

Python 在XGB5分级机中设置增压器

Python 在XGB5分级机中设置增压器,python,machine-learning,scikit-learn,xgboost,Python,Machine Learning,Scikit Learn,Xgboost,我看了文件 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, c

我看了文件

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'
关于如何选择我想要的助推器有什么建议吗?

更新:

我检查了v0.6的Github源代码,没有发现任何与助推器参数相关的内容。该参数位于最新版本的发行版中。然而,在0.6版本中也有一些关于Booster对象的信息,但是使用它可能比在最新版本中如何实现它更复杂

根据文件:

没有线性,它应该是线性的


以上内容可用于在具有增压器参数的Anaconda上安装0.80版本的xgboost。

谢谢。但这当然不能解决问题。请参阅回溯。整个助推器arg在unexpected@ErroriSalvo您使用的xgboost版本是什么?也可能是版本问题,请尝试更新到最新版本,然后重试。0.6。我绝对不能更新。我希望名称已经更改,因为这是xgboost的一个关键属性…:@ErroriSalvo我检查了v0.6的github源代码,没有找到任何与助推器参数相关的内容。该参数位于最新版本的发行版中。但是,在0.6版本中也有一些关于Booster对象的信息,但是它的使用可能比最新版本的实现方式更复杂。谢谢,这非常好。也许你可以把这个评论作为答案?
booster: string
Specify which booster to use: gbtree, gblinear or dart.