[英]Can not import IterativeImputer from sklearn.impute
I have a dataset with a column contains missing values which has relatively high correlation with another columns.我有一个数据集,其中一列包含缺失值,与另一列具有相对较高的相关性。 I want to use IterativeImputer from sklearn.impute but I receive this error:我想使用 sklearn.impute 中的 IterativeImputer 但我收到此错误:
ImportError: cannot import name 'IterativeImputer'
I upgraded my conda, my scikitlearn package and it is not resolved yet!我升级了我的 conda,我的 scikitlearn 包,但还没有解决!
I had the same problem even with the 0.21 version of sklearn.即使使用 0.21 版本的 sklearn,我也遇到了同样的问题。 You need to add an other import您需要添加其他导入
from sklearn.experimental import enable_iterative_imputer
from sklearn.impute import IterativeImputer
IterativeImputer is only available in scikit-learn 0.21, which as of April 2019 is only released as a developer version, not as stable. IterativeImputer 仅在 scikit-learn 0.21 中可用,截至 2019 年 4 月,该版本仅作为开发人员版本发布,不够稳定。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.