python - 获取'AttributeError:无法获取属性'DeprecationDict'
AttributeError: Can't get attribute 'DeprecationDict' on
Showing erro
问题描述
AttributeError: Can't get attribute 'DeprecationDict' on
Showing error in model = pickle.load(open('rf_regression_model.pkl', 'rb'))
this line。
尝试这个
with open('rf_regression_model','rb') as f:
model=pickle.load(f)
解决方案
您使用新版本的 sklearn 加载了由旧版本的 sklearn 训练的模型。
所以,选项是:
- 如果您有训练脚本和数据,则使用当前版本的 sklearn 重新训练模型
- 或者回退到警告消息中报告的较低 sklearn 版本
推荐阅读
- c# - 在文本块 wpf 中每 4 个字符后添加一个空格
- vb.net - visual basic .net 中的 AVI 捕获程序停止工作,在录制期间启用回调
- azure - 使用 Azure DNS 转发电子邮件
- reactjs - TouchableOpacity onPress() 功能不起作用
- python - 有没有办法使用 tkinter,这样当它运行时,用户可以单击一个按钮来创建一个可视化并显示该可视化
- javascript - 如何在 jQuery 代码中实现 ::ng-deep 的功能
- c - 计算一个数字除以另一个数字的次数
- c# - 使用 NAudio 在 WPF 上创建音频播放器。绑定不起作用
- excel - 如何在 Excel 中设置刷新顺序?包含数据库数据和更多层的数据透视表
- python - 用于弹性搜索的 Python API - 每次响应 10000
AttributeError: Can't get attribute 'DeprecationDict' on
Showing erro
问题描述
AttributeError: Can't get attribute 'DeprecationDict' on
Showing error in model = pickle.load(open('rf_regression_model.pkl', 'rb'))
this line。
尝试这个
with open('rf_regression_model','rb') as f:
model=pickle.load(f)
解决方案
您使用新版本的 sklearn 加载了由旧版本的 sklearn 训练的模型。
所以,选项是:
- 如果您有训练脚本和数据,则使用当前版本的 sklearn 重新训练模型
- 或者回退到警告消息中报告的较低 sklearn 版本
推荐阅读
- c# - 在文本块 wpf 中每 4 个字符后添加一个空格
- vb.net - visual basic .net 中的 AVI 捕获程序停止工作,在录制期间启用回调
- azure - 使用 Azure DNS 转发电子邮件
- reactjs - TouchableOpacity onPress() 功能不起作用
- python - 有没有办法使用 tkinter,这样当它运行时,用户可以单击一个按钮来创建一个可视化并显示该可视化
- javascript - 如何在 jQuery 代码中实现 ::ng-deep 的功能
- c - 计算一个数字除以另一个数字的次数
- c# - 使用 NAudio 在 WPF 上创建音频播放器。绑定不起作用
- excel - 如何在 Excel 中设置刷新顺序?包含数据库数据和更多层的数据透视表
- python - 用于弹性搜索的 Python API - 每次响应 10000