`R/rm_confusion_matrix.R`

`plot.rm_confusion_matrix.Rd`

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,
...,
results_to_show = "zero_one_loss",
plot_TCD_results = FALSE,
plot_only_one_train_time = NULL
)
```

- 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.

- results_to_show
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_TCD_results
A Boolean indicating whether the a cross-temporal decoding of the confusion matrices should only be plotted. If the

`results_to_show == "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.- plot_only_one_train_time
If this is set to a numeric value the the confusion matrix will only be plotted for the training time

*start time*that is specified. If the number passed is not equal to an exact start training time, then the closest training time will be used and a message saying that the time specified does not exist will be printed.

Returns a ggplot object that plots the confusion matrix results.

Other result_metrics:
`plot.rm_main_results()`

,
`plot_main_results()`

,
`rm_confusion_matrix()`

,
`rm_main_results()`