boxplots.as_data: Boxplots

View source: R/graphics.R

boxplots.as_dataR Documentation

Boxplots

Description

Represents a boxplot for each of the algorithms to compare their performance according to the response variable (KPI). When available, it also includes a box plot for the "ML" algorithm generated from the predictions.

Usage

## S3 method for class 'as_data'
boxplots(
  data_object,
  main = "Boxplot Comparison",
  labels = NULL,
  test = TRUE,
  predictions = NULL,
  by_families = FALSE,
  color_list = NULL,
  ml_color = NULL,
  ordered_option_names = NULL,
  xlab = "Strategy",
  ylab = "KPI",
  ...
)

Arguments

data_object

object of class as_data.

main

an overall title for the plot.

labels

character vector with the labels for each of the algorithms. If NULL, the y names of the data_object names will be used.

test

flag that indicates whether the function should use test data or training data.

predictions

a data frame with the predicted KPI for each algorithm (columns) and for each instance (rows). If NULL, the plot won't include a ML column.

by_families

boolean indicating whether the function should represent data by families or not. The family information must be included in the data_object parameter.

color_list

list with the colors for the plots. If NULL, or insufficient number of colors, the colors will be generated automatically.

ml_color

color por the ML boxplot. If NULL, it will be generated automatically.

ordered_option_names

vector with the name of the columns of data_object y variable in the correct order.

xlab

a label for the x axis.

ylab

a label for the y axis.

...

other parameters.

Value

A ggplot object representing the boxplots of instance-normalized KPI for each algorithm across instances.

Examples

data(branchingsmall)
data <- partition_and_normalize(branchingsmall$x, branchingsmall$y)
training <- AStrain(data, method = "glm")
predict_test <- ASpredict(training, newdata = data$x.test)
boxplots(data, predictions = predict_test)

ASML documentation built on April 3, 2025, 8:47 p.m.

Related to boxplots.as_data in ASML...