explore: Explore model results

Description Usage Arguments Details Value Examples

Description

explore() launches a Shiny application to interact with results from some tidymodels functions.

To investigate model fit(s), explore() can be used on objects produced by

The application starts in a new window and allows users to see how predicted values align with the true, observed data. There are 2-3 tabs in the application (depending on the object):

To quit the Shiny application, use the Esc key.

Usage

1
2
3
4
5
## Default S3 method:
explore(x, ...)

## S3 method for class 'tune_results'
explore(x, hover_cols = NULL, hover_only = FALSE, ...)

Arguments

x

An object with class tune_results.

...

Other parameters not currently used.

hover_cols

The columns to display while hovering in the Shiny app. This argument can be:

  • A dplyr selector (such as dplyr::starts_with()) or a set of selector if they are enclosed with in c().

  • A character vector.

hover_only

A logical to determine if interactive highlighting of points is enabled (the default) or not. This can be helpful for very large data sets.

Details

For resampling methods that produce more than one hold-out prediction per row (e.g. the bootstrap, repeated V-fold cross-validation), the predicted values shown in the plots are averages of the predictions for that specific row.

The ggplot2 theme used in the Shiny application corresponds to the current theme in the R session. Run ggplot2::theme_set() to change the theme for the plots in the Shiny application.

For classification models, there is a toggle on the bottom left of the application to choose between "Unscaled (i.e. linear)" and "Logit scaled" probability scaling. The first options plots the raw probabilities while the logit scaling uses scales::logit_trans() to rescale the axis. This can be helpful when a model with a linear predictor is used (e.g. logistic or multinomial regression) since it can show linear effects from a feature more easily.

When using the application, there may be warnings printed in the console about "event tied a source ID ... not registered". These can be ignored.

When racing results are explored, the shiny application will only allow tuning parameter combinations that were fully resampled. As a result, parameter combinations that were discarded during the race will now be able to be selected.

Value

A shiny application.

Examples

1
2
3
4
5
data(ames_mlp_itr)

if (interactive()) {
  explore(ames_mlp_itr, hover_cols = dplyr::contains("tude"))
}

shinymodels documentation built on Nov. 18, 2021, 1:12 a.m.