成功解决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”

解决方法

将参数进行修改

1. learning_rat = params3[1]
2. max_dept = params3[0]
3. n_estimato = params3[2]

改为

1. learning_rat = params3[0]
2. max_dept = params3[1]
3. n_estimato = params3[2]


相关文章
|
9月前
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解决方法
509 0
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
352 0
成功解决ret = ret / rcountTypeError: unsupported operand type(s) for /: ‘str‘ and ‘int‘
成功解决ret = ret / rcountTypeError: unsupported operand type(s) for /: ‘str‘ and ‘int‘
成功解决ret = ret / rcountTypeError: unsupported operand type(s) for /: ‘str‘ and ‘int‘
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'
172 0
|
Python
__str__ returned non-string (type int)
打开微信扫一扫,关注微信公众号【数据与算法联盟】 转载请注明出处:http://blog.csdn.net/gamer_gyt 博主微博:http://weibo.com/234654758 Github:https://github.com/thinkgamer 前言 这个问题是我在做这个项目【点击查看】时遇到的,主要是因为以前在使用django的models时,在models的str(self) 函数时,默认返回的字段都是CharField类型的,而在这次返回了一个IntegerField类型导致出现了题目中的错误。
2598 0

热门文章

最新文章