Skip to contents

This function creates an interactive plot representing the evaluation of a learning method across different training-set sizes.

Usage

plotly_single_evaluation(
  data,
  thr = NULL,
  name.ms = "mean score",
  colour = "rgba(255, 127, 14, 1)",
  add.uncertainty = T,
  color.ci = I("gray95"),
  alpha.ci = NULL,
  add.boxplot = T,
  colour.box = "rgba(136, 194, 136, 1)",
  colour.box.line = "rgba(44, 160, 44, 1)",
  add.scores = T,
  colour.point = "rgba(44, 160, 44, 1)",
  add.best = T,
  colour.best = "rgba(255, 182, 193, .9)",
  colour.best.line = "rgba(152, 0, 0, .8)",
  size.best = 10,
  shape.best = 0,
  title = "Evaluation",
  xlab = "Training-set size",
  ylab = "Performance",
  ...
)

Arguments

data

data.frame containing the data to plot. The function expects specific columns:

training_set_size

contains the considered training-set sizes

score

contains the performance metric for each model

mean_score

contains the mean performance metric for the specific training-set size

lower_ci

contains the lower bound of the confidence interval for the mean score

upper_ci

contains the upper bound of the confidence interval for the mean score

best_resample

contains the index of the automatically selected optimal training-set size

best_model

contains the index of the best model for the optimal training-set size

name

contains a grouping key, e.g. the learning method

tooltip

contains the hover text

thr

numerical value, if provided it is used to draw an horizontal line

colour

character string, containing the colour for the performance estimate

add.uncertainty

logical, whether to include the quantified uncertainty of the performance estimate in the plot

color.ci

character string, containing the colour for the confidence interval

alpha.ci

alpha value for color.ci

add.boxplot

logical, whether to include a boxplot in the figure

colour.box

character string, the colour of the boxplot

colour.box.line

character string, the colour of the lines in the boxplot

add.scores

logical, whether to add the performance metric of individual models as points in the plot

colour.point

character string, the colour of the points

add.best

logical, whether to add a point indicating the performance of what is reported as best model in data

colour.best

character string, the colour of the best model

colour.best.line

character string, the colour of the line of the best model

size.best

integer, size aesthetic passed to add_trace

shape.best

integer, shape aesthetic passed to add_trace

title

character string, the title of the plot

xlab, ylab

character string, axes labels

...

further arguments to plot_ly

Value

A plotly object.

Details

An interactive plot showing the mean performance and the related 95\ across different training-set sizes is produced. Individual scores and summary metrics in the form of boxplots can be also added (default) via the add.scores and add.boxplot arguments, respectively.

Author

Alessandro Barberis