成功解决lightgbm.basic.LightGBMError: Parameter max_depth should be of type int, got “0.02“

简介: 成功解决lightgbm.basic.LightGBMError: Parameter max_depth should be of type int, got “0.02“

解决问题


raise LightGBMError(decode_string(_LIB.LGBM_GetLastError()))

lightgbm.basic.LightGBMError: Parameter max_depth should be of type int, got "0.02"


解决思路


raise LightGBM 解码字符串出错!

lightgbm.basic.lightgbm错误:参数max_depth 应为int类型,但是却获得“0.02”


解决方法


将参数进行修改


learning_rat = params3[1]

max_dept = params3[0]

n_estimato = params3[2]

改为


learning_rat = params3[0]

max_dept = params3[1]

n_estimato = params3[2]


相关文章
|
12月前
|
算法 C# C++
HALCON error #1201: Wrong type of control parameter: 1 in operator threshold
HALCON error #1201: Wrong type of control parameter: 1 in operator threshold
RuntimeError: Given groups=1, weight of size 64 128 1 7, expected input[16,
RuntimeError: Given groups=1, weight of size 64 128 1 7, expected input[16,
2849 0
|
5月前
|
Linux Windows
【已解决】ValueError: num_samples should be a positive integer value, but got num_samples=0
【已解决】ValueError: num_samples should be a positive integer value, but got num_samples=0
|
5月前
|
机器学习/深度学习 人工智能
【CatBoost报错解决】CatBoostError: Bad value for num feature[non default doc idx=0,feature idx=19]=
【CatBoost报错解决】CatBoostError: Bad value for num feature[non default doc idx=0,feature idx=19]=
YOLO V5出现RuntimeError: result type Float can‘t be cast to the desired output type long int解决方法
YOLO V5出现RuntimeError: result type Float can‘t be cast to the desired output type long int解决方法
654 0
|
索引
Result window is too large, from + size must be less than or equal to: [10000]
Result window is too large, from + size must be less than or equal to: [10000]
165 0
Optional int parameter ‘id‘ is present but cannot be translated into a null value due to being ……
Optional int parameter ‘id‘ is present but cannot be translated into a null value due to being ……
281 0
|
机器学习/深度学习 PyTorch 算法框架/工具
解决Pytorch中RuntimeError: expected scalar type Double but found Float
解决Pytorch中RuntimeError: expected scalar type Double but found Float
2636 0
成功解决lightgbm.basic.LightGBMError: Parameter max_depth should be of type int, got “0.02“
成功解决lightgbm.basic.LightGBMError: Parameter max_depth should be of type int, got “0.02“
|
数据库
Incorrect result size: expected 1, actual 2
Incorrect result size: expected 1, actual 2
849 0