Getting 'AttributeError: Can't get attribute 'DeprecationDict' on <module 'sklearn.utils.deprecation'' this error while executing ML project
Getting 'AttributeError: Can't get attribute 'DeprecationDict' on <module 'sklearn.utils.deprecation'' this error while executing ML project
AttributeError: 无法在
上获取属性 'DeprecationDict'
model = pickle.load(open('rf_regression_model.pkl', 'rb'))
这一行显示错误。
试试这个
with open('rf_regression_model','rb') as f:
model=pickle.load(f)
您使用新版本的 sklearn 加载了由旧版本的 sklearn 训练的模型。
所以,选项是:
- 如果你有,请使用当前版本的 sklearn 重新训练模型
训练脚本和数据
- 或者回退到较低的sklearn版本
在警告信息中报告
AttributeError: 无法在
上获取属性 'DeprecationDict'
model = pickle.load(open('rf_regression_model.pkl', 'rb'))
这一行显示错误。
试试这个
with open('rf_regression_model','rb') as f:
model=pickle.load(f)
您使用新版本的 sklearn 加载了由旧版本的 sklearn 训练的模型。
所以,选项是:
- 如果你有,请使用当前版本的 sklearn 重新训练模型 训练脚本和数据
- 或者回退到较低的sklearn版本 在警告信息中报告