This function plots confusion matrices after the decoding analysis has been run (and all results have been aggregated). This function can also plot mutual information calculated from the confusion matrix.

# S3 method for rm_confusion_matrix
plot(
  x,
  ...,
  result_type = "zero_one_loss",
  plot_only_same_train_test_time = TRUE
)

Arguments

x

A rm_confusion_matrix object that has aggregated runs from a decoding analysis, e.g., if DECODING_RESULTS are the output from the run_decoding(cv) then this argument should be DECODING_RESULTS$rm_confusion_matrix.

...

This is needed to conform to the plot generic interface.

result_type

A string specifying the type of result to plot that can take the following values:

  • "zero_one_loss": plot a regular confusion matrix.

  • "decision_vals": plot a confusion matrix with the average decision values.

  • "mutual_information": plot the mutual information calculated from the zero-one loss confusion matrix.

plot_only_same_train_test_time

A boolean indicating whether the confusion matrices should only be plotted at the same training and test times. If the result_type == "mutual_information" setting this to TRUE will plot a TCD plot of the mutual information otherwise it will plot a line plot of the mutual information for training and testing at the same time.

See also