Display performance metrics by class for a classification model

fdPanelClassificationMetricsByClass(actual, predicted, vertical = TRUE,
  cutoffs = c(0, 0.6, 0.75, 1))

computeClassificationMetricsByClass(actual, predicted, vertical = TRUE)

Arguments

actual
vector of actual classes.
predicted
vector of predicted classes.
vertical
boolean indicating if panel should display measures in columns.
cutoffs
vector of cutoffs to use for deciding bar colors.

See also

Other classification: fdPanelClassificationMetrics

Examples

library(rpart)
fit <- rpart(Species ~ ., data = iris)
actual <- iris$Species
predicted <- predict(fit, type = 'class')

computeClassificationMetricsByClass(actual = actual, predicted = predicted)

if (interactive()){
  fdPanelClassificationMetricsByClass(actual = actual, predicted = predicted) %>%
    fdPreview("Classification Metrics")
}