默认情况下,提升回归树(包gbm)的R实现如何处理预测变量的缺失值?根据哪种算法,它们是否被估算,如果是,
我的问题背景:差不多一年前我做了分析,并使用了Elith等人提供的脚本.2008年(促进回归树的工作指南,Journal of Animal Ecology 77,802-813)来调用gbm.我现在意识到我有一些预测变量的NA,我想知道增强的回归树如何处理它们.浏览通过各种手册和文件,我发现之类的语句"提振回归树可容纳缺失值"之类的,但我找不到什么GBM与缺失值做一个精确的描述.分析本身没有问题,因此gbm必须以一种或另一种方式处理它们.在gbm手册中,甚至有一个例子,其中引入了故意的NA来证明gbm可以毫无问题地继续工作.现在我'
gbm 函数可用于插补,如 Jeffrey Wong 博客中所述:。缺失值得到代理分割,然后用户可以获得具有不完整预测变量集的 IEM 的预测。
他基于这种方法开发了一个软件包。GitHub 存储库在 gbm 文件之一的标头中包含以下内容:
#' GBM Imputation
#'
#' Imputation using Boosted Trees
#' Fill each column by treating it as a regression problem. For each
#' column i, use boosted regression trees to predict i using all other
#' columns except i. If the predictor variables also contain missing data,
#' the gbm function will itself use surrogate variables as substitutes for the predictors.
#' This imputation function can handle both categorical and numeric data.
Run Code Online (Sandbox Code Playgroud)
为了找到这个,我只需在谷歌搜索中输入:gbm 如何处理缺失值。这是我的第二次打击。
https://github.com/jeffwong/imputation/blob/master/R/gbmImpute.R