tune (version 0.0.1)

autoplot.tune_results: Plot tuning search results

Description

Plot tuning search results

Usage

# S3 method for tune_results
autoplot(
  object,
  type = c("marginals", "parameters", "performance"),
  metric = NULL,
  width = NULL,
  ...
)

Arguments

object

A tibble of results from tune_grid() or tune_bayes().

type

A single character value. Choices are "marginals" (for a plot 'of each predictor versus performance), "parameters" (each parameter versus search iteration), or "performance" (performance versus iteration). The latter two choices are only used for tune_bayes().

metric

A character vector or NULL for which metric to plot. By default, all metrics will be shown via facets.

width

A number for the width of the confidence interval bars when type = "perfomance". A value of zero prevents them from being shown.

...

Not currently used.

Value

A ggplot2 object.

Details

The parameters are currently represented in their natural units.

A single categorical tuning parameter is supported when other numeric parameters are also in the results. Any number of numeric tuning parameters can be used.

See Also

tune_grid(), tune_bayes()

Examples

Run this code
# NOT RUN {
# For grid search:
data("example_ames_knn")

# Plot the tuning parameter values versus performance
autoplot(ames_grid_search, metric = "rmse")


# For iterative search:
# Plot the tuning parameter values versus performance
autoplot(ames_iter_search, metric = "rmse", type = "marginals")

# Plot tuning parameters versus iterations
autoplot(ames_iter_search, metric = "rmse", type = "parameters")

# Plot performance over iterations
autoplot(ames_iter_search, metric = "rmse", type = "performance")
# }

Run the code above in your browser using DataLab