Display performance metrics for a regression model

Compute metrics to evaluate performance of a regression model

fdPanelRegressionMetrics(actual, predicted, metrics = c("MAE", "MAPE",
  "MedianAPE", "RMSE", "RMSLE", "RAE", "R2_Score"))

computeRegressionMetrics(actual, predicted, metrics = c("MAE", "MAPE",
  "MedianAPE", "RMSE", "RMSLE", "RAE", "R2_Score"))

Arguments

actual
vector of actual values.
predicted
vector of predicted values.
metrics
vector of metrics to compute. See MLmetrics for a complete list of metrics that can be used.

Examples

library(flightdeck)
data(cars)
reg <- lm(log(dist) ~ log(speed), data = cars)
actual <- cars$dist
predicted <- exp(reg$fitted.values)
fdPanelRegressionMetrics(actual, predicted) %>%
  fdPreview("Regression Metrics")