Display performance metrics for a classification model
fdPanelClassificationMetrics(actual, predicted, metrics = c("Accuracy", "Recall", "Precision", "F1_Score")) computeClassificationMetrics(actual, predicted, metrics = c("Precision", "Recall", "F1_Score", "Accuracy"))
MLmetrics
for list
of potential metricsOther classification: fdPanelClassificationMetricsByClass
library(flightdeck) library(rpart) data(ptitanic, package = 'rpart.plot') fit <- rpart(survived ~ ., data = ptitanic) actual <- ptitanic$survived predicted <- predict(fit, type = 'class') computeClassificationMetrics(actual = actual, predicted = predicted) if (interactive()){ fdPanelClassificationMetrics(actual = actual, predicted = predicted) %>% fdPreview("Classification Metrics") }