Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

How to show predictions for models fitted using caret in R

$
0
0

@pagal_guy wrote:

Hello,

I am using caret for modeling so that I can use cross validation.Below is my code for rpart:

Control <- trainControl(method='cv', number=5,repeats = 10,returnResamp='none')
rpartModel <- train(Loan_Status~.,data = training, 
                  method='rpart', 
                  trControl=Control,  
                  metric = "Accuracy")

However I am not getting the predicted values:

> rpartModel$pred
NULL

How do I get the predictions??r

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles