Prediction models are used to predict an outcome based on input variables. Missing data in input variables often occurs at model development and at prediction time. The missForestPredict R package proposes an adaptation of the missForest imputation algorithm that is fast, user-friendly and tailored for prediction settings. The algorithm iteratively imputes variables using random forests until a convergence criterion (unified for continuous and categorical variables and based on the out-of-bag error) is met. The imputation models are saved for each variable and iteration and can be applied later to new observations at prediction time. The missForestPredict package offers extended error monitoring, control over variables used in the imputation and custom initialization. This allows users to tailor the imputation to their specific needs. The missForestPredict algorithm is compared to mean/mode imputation, linear regression imputation, mice, k-nearest neighbours, bagging, miceRanger and IterativeImputer on eight simulated datasets with simulated missingness (48 scenarios) and eight large public datasets using different prediction models. missForestPredict provides competitive results in prediction settings within short computation times.
翻译:预测模型用于根据输入变量预测结果。输入变量中的缺失数据在模型开发阶段和预测阶段均频繁出现。missForestPredict R 包提出了一种改进的 missForest 插补算法,该算法快速、用户友好且专为预测场景定制。该算法使用随机森林迭代插补各变量,直至满足收敛准则(该准则适用于连续变量与分类变量,并基于袋外误差统一构建)。每次迭代中各变量的插补模型均被保存,后续可在预测阶段应用于新观测值。missForestPredict 包提供扩展的错误监控、对插补所用变量的控制及自定义初始化功能,使用户能根据特定需求定制插补流程。本研究在八组含模拟缺失的仿真数据集(48 种场景)及八组大型公开数据集上,将 missForestPredict 算法与均值/众数插补、线性回归插补、mice、k 近邻、装袋法、miceRanger 及 IterativeImputer 等方法,通过不同预测模型进行对比。实验表明,missForestPredict 在预测场景中能以较短计算时间获得具有竞争力的结果。