【问题标题】:Multiple Imputation within Python and DecisiontreesPython 和决策树中的多重插补
【发布时间】:2022-07-14 02:34:25
【问题描述】:

我试图在 python 中进行多重插补。 我的动机是由 R 中的 mouse 包驱动的,但是,我正在寻找 python 中的等价物。我找到了sklearnIterativeImputer。 按照文档和一些关于 SO 的帖子,我能够生成多个估算集。但是,此估算值是通过设置 sample_posterior = True 从分布中得出的。但这不是我要找的。我想不是从分布中提取值,而是作为真实样本。 IE。与在 R 中一样,从决策树中同一叶中的那些值中提取。 (见第 94 页https://cran.r-project.org/web/packages/mice/mice.pdf)。有没有办法将IterativeImputer 中决策树的“预测”更改为对同一片叶子进行随机观察?

文档:https://scikit-learn.org/stable/modules/impute.html

在 SO 上发布: IterativeImputer - sample_posteriorImputing missing values using sklearn IterativeImputer class for MICE

【问题讨论】:

    标签: python scikit-learn imputation


    【解决方案1】:

    miceforest 可以满足您的需求。它默认实现均值匹配,从数据中的真实样本中提取。

    但是,miceforest 使用 lightgbm 作为后端。这可能是也可能不是您想要的。

    【讨论】:

      猜你喜欢
      • 2015-09-21
      • 2021-08-23
      • 1970-01-01
      • 2016-03-12
      • 2021-08-19
      • 2020-10-18
      • 2018-09-06
      • 2020-02-26
      • 2021-05-27
      相关资源
      最近更新 更多