r - How do I deal with missing values on every row when using caret for prediction? -


i have large dataset (200 000+ rows, 140 variables) has @ least 1 missing value on each row have replaced na. trying use caret library predict. rattle library can deal them, know how use caret?

the caret library direction says should use below:

gbmfit1 <- train(twoplus~., data=training, method='gbm', trcontrol=fitcontrol,                   na.action=na.omit) 

but gives error:

error in train.formula(twoplus ~ ., data = training, method = "m5", trcontrol = fitcontrol,  :    every row has @ least 1 missing value found 

you want take @ pre-processing section of caret documentation. imputation section:

http://topepo.github.io/caret/preprocess.html#impute


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -