Skip to content

Commit

Permalink
Fixed testing error
Browse files Browse the repository at this point in the history
  • Loading branch information
topepo committed Jun 27, 2017
1 parent 772c1e3 commit 3ee00ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RegressionTests/Code/rpart.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ test_class_rec <- train(recipe = rec_cls,
method = "rpart",
trControl = cctrl1)

test_class_pred_rec <- predict(test_class_rec, testing[, -ncol(testing)])
test_class_pred_rec <- predict(test_class_rec, testing[, colnames(testing) != "Class"])

test_levels <- levels(test_class_cv_model)
if(!all(levels(trainY) %in% test_levels))
Expand Down Expand Up @@ -142,7 +142,7 @@ test_reg_rec <- train(recipe = rec_reg,
method = "rpart",
trControl = rctrl1)

test_reg_pred_rec <- predict(test_reg_rec, testing[, -ncol(testing)])
test_reg_pred_rec <- predict(test_reg_rec, testing[, names(testing) != "y"])

#########################################################################

Expand Down

0 comments on commit 3ee00ce

Please sign in to comment.