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.
This exercise is part of the course
Feature Engineering in R
Exercise instructions
- Bind all three models by rows.
- Create a parallel coordinates plot to compare the models' performance in both metrics.
Hands-on interactive exercise
Have a go at this exercise by completing this sample 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)