gpt4 book ai didi

python-3.x - 无法使用来自 fancyimputer 的 MICE (Python)

转载 作者:行者123 更新时间:2023-12-04 01:28:37 42 4
gpt4 key购买 nike

我只是想使用 fancyimpute 的 MICE 函数。简单的代码行 from fancyimpute import MICE 给出错误 cannot import name 'MICE'

我确实尝试咨询了https://github.com/iskandr/fancyimpute (我觉得很奇怪在那里找不到 MICE 但人们正在实现它 https://medium.com/logicai/5-useful-python-packages-from-kaggles-kernels-you-didn-t-know-existed-part-2-4b35ba2d812 )以及关于 MICE 和导入问题的堆栈问题,但运气不好

最佳答案

以下步骤在 MAC OSX 上对我有用。

  1. 在终端中使用 easy_install fancyimpute 而不是 pip install fancyimpute

Unable to install fancyimpute for use in Jupyter

  1. 在您的 jupyter 笔记本中使用“from fancyimpute import IterativeImputer as MICE”。看起来 MICE 现在被称为 IterativeImputer。

https://github.com/iskandr/fancyimpute/issues/81

  1. 在您的数据框上使用“df1 = MICE().fit_transform(df)”。看起来 IterativeImputer 不再具有“完整”的函数/方法,而应该使用 fit 或 fit_transform。

关于python-3.x - 无法使用来自 fancyimputer 的 MICE (Python),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54059964/

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