caret confusion matrix continuous data code example Example: confusion matrix caret package r confusionMatrix(data = test_set$pred, reference = test_set$obs)