produce the confusion matrix using function confusionMatrix from package caret if classify=TRUE, otherwise calculate the RMSE between the predicted and groundtruth values.
predSummary(reference, prediction,
lev = NULL, classify = TRUE)groundtruth values.
predicted values.
a vector of character, specifying the group names. Ignored if classify=FALSE.
a boolean value, telling whether a classification or regression task.
If classify=TRUE, a list, the output from confusionMatrix
Otherwise a numeric value, giving the RMSE of the prediction.