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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -