成功解决ValueError: Parameter values for parameter (n_estimators) need to be a sequence.

简介: 成功解决ValueError: Parameter values for parameter (n_estimators) need to be a sequence.

输出结

image.png

 

设计思

值错误:参数(n_estimators)的参数值需要是一个序列。


 

核心代

定位到出错的位置,发现存在 range(1, 51, 1),可知,此函数输出的是 range型数据,而要求需要是序列类型,即list型数据,所以将range类型转为list类型数据即可!


相关文章:成功解决random.py"之TypeError: 'range' object does not support item assignmenthttps://yunyaniu.blog.csdn.net/article/details/82843781



哈哈,大功告成!


相关文章
|
SQL
Parameter ‘id‘ not found. Available parameters are [collection, list]
Parameter ‘id‘ not found. Available parameters are [collection, list]
236 0
|
6月前
Argument of type 'XX' is not assignable to parameter of type 'XX'
Argument of type 'XX' is not assignable to parameter of type 'XX'
128 0
报错 ValueError: too many values to unpack (expected 2)
报错 ValueError: too many values to unpack (expected 2)
206 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 ……
305 0
ValueError: not enough values to unpack (expected 3, got 2)
这个错误通常是因为在解包(unpacking)元组(tuple)时,元组中的元素数量与期望不符,导致无法将所有元素正确解包。 例如,在以下代码中,元组中只有两个元素,但我们尝试将其解包为三个变量:
618 0
|
存储 Shell
Understanding parameters:理解参数(Parameter)
Understanding parameters:理解参数(Parameter)
123 0
|
Windows
Illegal character in opaque part at index
Illegal character in opaque part at index
成功解决ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C h
成功解决ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C h
成功解决ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C h
|
IDE 开发工具
C - error: converting to execution character set:Illegal byte sequence
C - error: converting to execution character set:Illegal byte sequence
1297 0
C - error: converting to execution character set:Illegal byte sequence