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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -