gpt4 book ai didi

python - 我应该使用什么来代替 Bootstrap?

转载 作者:太空狗 更新时间:2023-10-29 20:25:32 26 4
gpt4 key购买 nike

当我运行这段代码时:

from sklearn import cross_validation
bs = cross_validation.Bootstrap(9, random_state=0)

我收到这个弃用警告:

C:\Anaconda\envs\p33\lib\site-packages\sklearn\cross_validation.py:684: DeprecationWarning: Bootstrap will no longer be supported as a cross-validation method as of version 0.15 and will be removed in 0.17
"will be removed in 0.17", DeprecationWarning)

我应该使用什么来代替 Bootstrap ?

最佳答案

来自 the scikit-learn 0.15 release notes ,在“API 更改摘要”下

来自the source code itself :

# See, e.g., http://youtu.be/BzHz0J9a6k0?t=9m38s for a motivation
# behind this deprecation
warnings.warn("Bootstrap will no longer be supported as a " +
"cross-validation method as of version 0.15 and " +
"will be removed in 0.17", DeprecationWarning)

关于python - 我应该使用什么来代替 Bootstrap?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28030291/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com