小编Ayu*_*ung的帖子

hyperopt 结果超出了我的 hp.choice 限制,为什么?(XGBoost)

我遇到了一个奇怪的问题:我通过 hyperopt
定义了我的 XGB 超参数'max_depth'

hp.choice('max_depth',range(2,20))
Run Code Online (Sandbox Code Playgroud)

但我得到'max_depth' = 01结果,这不在[2,20)限制之内。为什么?我错过了什么吗?谢谢。

错误结果:

{'colsample_bytree': 0.18, 'learning_rate': 0.05, 'max_depth': 1, 'reg_alpha': 3.44, 'reg_lambda': 0.92}

{'colsample_bytree': 0.41, 'learning_rate': 0.09, 'max_depth': 0, 'reg_alpha': 0.14, 'reg_lambda': 3.53}

{'colsample_bytree': 0.71, 'learning_rate': 0.17, 'max_depth': 0, 'reg_alpha': 2.21, 'reg_lambda': 2.82}
Run Code Online (Sandbox Code Playgroud)
hp.choice('max_depth',range(2,20))
Run Code Online (Sandbox Code Playgroud)

xgboost hyperopt

3
推荐指数
2
解决办法
1438
查看次数

标签 统计

hyperopt ×1

xgboost ×1