xgbImpute: test xgbImpute package

Description Usage Arguments Examples

View source: R/xgbImpute.R

Description

Imputation based on XGboost. Fill each column by treating it as a regression problem. For each column i, use XGboost to predict i using all other columns except i.

Usage

1
xgbImpute(raw.data, learner = 'gblinear', verbose = T)

Arguments

raw.data

a data frame where each row is a different sample

learner

the base learner that the xgboost will use, including 'gblinear' (default) and 'gbtree'

verbose

if TRUE print status updates

Examples

1
2
3
4
  x = data.frame(matrix(rnorm(100),10,10))
  x.missing <- x > 1
  x[x.missing] <- NA
  x.imputed <- xgbImpute(x)

YuAirLab/xgbImpute documentation built on May 18, 2019, 1:30 p.m.