Plot the hyperparameter effects data

Description

Plot hyperparameter validation path. Automated plotting method for HyperParsEffectData object. Useful for determining the importance or effect of a particular hyperparameter on some performance measure and/or optimizer.

Usage

1
2
3
4
plotHyperParsEffect(hyperpars.effect.data, x = NULL, y = NULL, z = NULL,
  plot.type = "scatter", loess.smooth = FALSE, facet = NULL,
  pretty.names = TRUE, global.only = TRUE, interpolate = NULL,
  show.experiments = FALSE, show.interpolated = FALSE, nested.agg = mean)

Arguments

hyperpars.effect.data

[HyperParsEffectData]
Result of generateHyperParsEffectData

x

[character(1)]
Specify what should be plotted on the x axis. Must be a column from HyperParsEffectData$data

y

[character(1)]
Specify what should be plotted on the y axis. Must be a column from HyperParsEffectData$data

z

[character(1)]
Specify what should be used as the extra axis for a particular geom. This could be for the fill on a heatmap or color aesthetic for a line. Must be a column from HyperParsEffectData$data. Default is NULL.

plot.type

[character(1)]
Specify the type of plot: “scatter” for a scatterplot, “heatmap” for a heatmap, “line” for a scatterplot with a connecting line, or “contour” for a contour plot layered ontop of a heatmap. Default is “scatter”.

loess.smooth

[logical(1)]
If TRUE, will add loess smoothing line to plots where possible. Note that this is probably only useful when plot.type is set to either “scatter” or “line”. Must be a column from HyperParsEffectData$data Default is FALSE.

facet

[character(1)]
Specify what should be used as the facet axis for a particular geom. When using nested cross validation, set this to “nested_cv_run” to obtain a facet for each outer loop. Must be a column from HyperParsEffectData$data Default is NULL.

pretty.names

[logical{1}]
Whether to use the short name of the learner instead of its ID in labels. Defaults to TRUE.

global.only

[logical(1)]
If TRUE, will only plot the current global optima when setting x = "iteration" and y as a performance measure from HyperParsEffectData$measures. Set this to FALSE to always plot the performance of every iteration, even if it is not an improvement. Default is TRUE.

interpolate

[Learner | character(1)]
If not NULL, will interpolate non-complete grids in order to visualize a more complete path. Only meaningful when attempting to plot a heatmap or contour. This will fill in “empty” cells in the heatmap or contour plot. Note that cases of irregular hyperparameter paths, you will most likely need to use this to have a meaningful visualization. Accepts either a Learner object or the learner as a string for interpolation. Default is NULL.

show.experiments

[logical(1)]
If TRUE, will overlay the plot with points indicating where an experiment ran. This is only useful when creating a heatmap or contour plot with interpolation so that you can see which points were actually on the original path. Note: if any learner crashes occurred within the path, this will become TRUE. Default is FALSE.

show.interpolated

[logical(1)]
If TRUE, will overlay the plot with points indicating where interpolation ran. This is only useful when creating a heatmap or contour plot with interpolation so that you can see which points were interpolated. Default is FALSE.

nested.agg

[function]
The function used to aggregate nested cross validation runs when plotting 2 hyperpars simultaneously. This is only useful when nested cross validation is used along with plotting a 2 hyperpars. Default is mean.

Value

ggplot2 plot object.

Note

Any NAs incurred from learning algorithm crashes will be indicated in the plot and the NA values will be replaced with the column min/max depending on the optimal values for the respective measure. Execution time will be replaced with the max. Interpolation by its nature will result in predicted values for the performance measure. Use interpolation with caution.

Examples

1
# see generateHyperParsEffectData

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.