- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
clf = XGBClassifier(learning_rate =0.05,
n_estimators=300,
max_depth=10,
min_child_weight=1,
gamma=0.5,
reg_alpha=0,
reg_lambda=2,
subsample=0.8,
colsample_bytree=0.8,
scale_pos_weight=1,
objective='multi:softmax',
num_class=14,
nthread=20,
seed=1000)
xgb_param = clf.get_xgb_params()
xgTrain = xgb.DMatrix(x_train_, label=y_train_)
print ('Start cross validation')
cvresult = xgb.cv(xgb_param, xgTrain, num_boost_round=500, nfold=5, metrics=['mlogloss'],
early_stopping_rounds=5, stratified=True, seed=1000)
print('Best number of trees = {}'.format(cvresult.shape[0]))
clf.set_params(n_estimators=cvresult.shape[0])
print('Fit on the all_trainingsdata')
clf.fit(X_train,y_train,eval_metric=['mlogloss'])
WARNING: /workspace/src/learner.cc:480:Parameters: { scale_pos_weight } might not be used.
This may not be accurate due to some parameters are only used in language bindings butpassed down to XGBoost core. Or some parameters are not used but slip through thisverification. Please open an issue if you find above cases.
最佳答案
scale_pos_weight 是一个用于不平衡类的二元分类问题的参数。如果你只有几个正例和很多负例,它可以给正例更多的权重,这可以提高准确性。
您正在进行多类分类(如“multi:softmax”的目标所示),因此无法应用此参数。
您的笔记本将运行良好,您可以相信自己的结果。这只是一个警告。您可以通过删除调用中的 scale_pos_weight=1 参数来消除它。
关于xgboost - 警告 :/workspace/src/learner. cc:480:参数:{ scale_pos_weight } 可能未使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63258627/
为什么 Eclipse 在构建 Android 项目时会陷入无限循环,用于构建工作区...和(重新)构建工作区...和(重新)构建工作区... 这是一个已知的错误吗? 摆脱这个循环的正确方法是什么?
当我排队构建时,我遇到了这个问题。构建因错误而死亡 The path C:\[Path]\Sources is already mapped in workspace [Server Name]. s
本文整理了Java中org.brixcms.workspace.Workspace.getId()方法的一些代码示例,展示了Workspace.getId()的具体用法。这些代码示例主要来源于Gith
本文整理了Java中org.brixcms.workspace.Workspace.setAttribute()方法的一些代码示例,展示了Workspace.setAttribute()的具体用法。这
本文整理了Java中org.brixcms.workspace.Workspace.getAttribute()方法的一些代码示例,展示了Workspace.getAttribute()的具体用法。这
我有一个工作区 A,其中在计算机 A 上 checkout 了文件。现在我想继续在计算机 B 上进行开发。我从计算机 A 复制文件,并创建一个新的工作区 B 并映射到复制的文件。 现在 Visual
我正在用 gatsby 创建一个新项目gatsby new YourProjectName2 https://github.com/Vagr9K/gatsby-advanced-starter并得到一
我想切换构建节点并将整个工作区转移到新节点。 node('node1') { ... stash 'my_workspace' } node('node2') { ...
本文整理了Java中org.protege.editor.core.ui.workspace.Workspace.getEditorKit()方法的一些代码示例,展示了Workspace.getEdi
本文整理了Java中org.protege.editor.core.ui.workspace.Workspace.getViewManager()方法的一些代码示例,展示了Workspace.getV
本文整理了Java中org.protege.editor.core.ui.workspace.Workspace.getStatusArea()方法的一些代码示例,展示了Workspace.getSt
本文整理了Java中org.protege.editor.core.ui.workspace.Workspace.save()方法的一些代码示例,展示了Workspace.save()的具体用法。这些
本文整理了Java中org.protege.editor.core.ui.workspace.Workspace.installLookAndFeelMenu()方法的一些代码示例,展示了Worksp
本文整理了Java中org.protege.editor.core.ui.workspace.Workspace.setLayout()方法的一些代码示例,展示了Workspace.setLayout
本文整理了Java中org.protege.editor.core.ui.workspace.Workspace.changeFontSize()方法的一些代码示例,展示了Workspace.chan
本文整理了Java中org.protege.editor.core.ui.workspace.Workspace.getTitle()方法的一些代码示例,展示了Workspace.getTitle()
本文整理了Java中org.protege.editor.core.ui.workspace.Workspace.initialiseExtraMenuItems()方法的一些代码示例,展示了Work
本文整理了Java中org.protege.editor.core.ui.workspace.Workspace.add()方法的一些代码示例,展示了Workspace.add()的具体用法。这些代码
本文整理了Java中org.protege.editor.core.ui.workspace.Workspace.showResultsView()方法的一些代码示例,展示了Workspace.sho
本文整理了Java中org.protege.editor.core.ui.workspace.Workspace.adjustBorder()方法的一些代码示例,展示了Workspace.adjust
我是一名优秀的程序员,十分优秀!