CommencerCommencer gratuitement

Binding models together

When running several models, it is useful to summarize your results for comparison, both as a tibble and as a parallel coordinates chart. The glm_metrics object that your created is loaded in the workspace, as well as the corresponding bayes_metrics and mixed_metrics. The GGally package is ready for you.

Cet exercice fait partie du cours

Feature Engineering in R

Afficher le cours

Instructions

  • Bind all three models by rows.
  • Create a parallel coordinates plot to compare the models' performance in both metrics.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

model <- c("glm", "glm","bayes","bayes", "mixed", "mixed")

# Bind models by rows
models <- ___(glm_metrics,bayes_metrics, mixed_metrics)%>%
  add_column(model = model)%>%
  select(-.estimator) %>%
  spread(model,.estimate)

models

# Create a parallel coordinates plot
___(models,
           columns = 2:4, groupColumn = 1,
           scale="globalminmax",
           showPoints = TRUE) 
Modifier et exécuter le code