gcmplot {rTLsDeep}R Documentation

Plot confusion matrix

Description

This function plots the confusion matrix for classification assessment

Usage

gcmplot(
  cm,
  colors = c(low = "white", high = "#009194"),
  title = "cm",
  prop = TRUE
)

Arguments

cm

An confusion matrix object of class "confusionMatrix". Output of the [rTLsDeep::confmatrix_damage()] function.

colors

A vector defining the low and high colors. Default is c(low="white", high="#009194").

title

A character defining the title of the figure.

prop

If TRUE percentage values will be plotted to the figure otherwise Freq.

Value

Returns an object of class gg and ggplot and plot of the confusion matrix.

Examples


# Path to rds file
rdsfile <- system.file("extdata", "cm_vgg.rds", package="rTLsDeep")

# Read RDS fo;e
cm_vgg<-readRDS(rdsfile)

# Plot confusion matrix
gcmplot_vgg<-gcmplot(cm_vgg,
                    colors=c(low="white", high="#009194"),
                    title="densenet")


[Package rTLsDeep version 0.0.5 Index]