Plots visualizations of monitor metrics (STP ratio, adv accuracy, adv losses and classifier losses) epoch by epoch. It is useful for the monitoring of the learning process, thus the user can see if everything works properly. To use this, the user has to set monitor on during the fair_train process.

plot_monitor(
  STP = NULL,
  adversary_acc = NULL,
  adversary_losses = NULL,
  classifier_acc = NULL,
  patchwork = TRUE
)

Arguments

STP

double, vector of Statistical Parity ratio value

adversary_acc

double, vector containing adversarial models accuracy for each epoch

adversary_losses

double, vector of adversaries losses

classifier_acc

double, vector of adversaries accuracy

patchwork

logical, if TRUE it plots all 4 plots into 2x2 matrix, with FALSE plots every plot singularly

Value

NULL - plots the visualizations

Examples

if (FALSE) { # presaved monitoring data monitor2 <- torch_load(system.file("extdata","monitoring2",package="fairpan")) plot_monitor(monitor2$STP ,monitor2$adversary_acc, monitor2$classifier_acc, monitor2$adversary_losses) }