predSummary: Calculate the merit of the prediction

Description Usage Arguments Value Author(s) See Also

View source: R/functions.R

Description

produce the confusion matrix using function confusionMatrix from package caret if classify=TRUE, otherwise calculate the RMSE between the predicted and groundtruth values.

Usage

1
2
  predSummary(reference, prediction, 
              lev = NULL, classify = TRUE)

Arguments

reference

groundtruth values.

prediction

predicted values.

lev

a vector of character, specifying the group names. Ignored if classify=FALSE.

classify

a boolean value, telling whether a classification or regression task.

Value

If classify=TRUE, a list, the output from confusionMatrix Otherwise a numeric value, giving the RMSE of the prediction.

Author(s)

Shuxia Guo, Thomas Bocklitz, Juergen Popp

See Also

confusionMatrix


rModeling documentation built on March 26, 2020, 7:48 p.m.