plot.Subcascades: Heatmap of a Subcascades Object

Description Usage Arguments Details Value See Also Examples

View source: R/plot.R

Description

Plots a heatmap, that shows the performance of cascades of a Subcascades object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## S3 method for class 'Subcascades'
plot(
  x = NULL,
  classNames = NULL,
  class.sort = "",
  row.sort = "",
  main = "subcascades",
  xlab = "classes",
  ylab = "cascades",
  digits = 3,
  ignore = 0,
  casc.colors = c("#f5f5f5", "#01665e"),
  na.color = c("#f5f5f5"),
  color.key = TRUE,
  las = 1,
  cex = 1,
  cex.lab = 1,
  srt = 30,
  ...
)

Arguments

x

A Subcascades object as it is returned by subcascades-function.

classNames

Character vector including the names of the classes.

class.sort

The classes can be sorted either by: "" = unsorted, "max": sorted according to maximal occurrence of a class or "sens": sorted according to highest class-wise sensitivity

row.sort

The cascade can be sorted by: "" = unsorted, "max": sorted according to maximal occurrence of maximal length or "sens": sorted according to highest class-wise sensitivity

main

See plot.

xlab

A title for the x axis (see plot).

ylab

A title for the y axis (see plot).

digits

Integer indicating the number of decimal places to be used (see round).

ignore

A numeric value between 0 and 1. All confusion and purity values below this number are not written as string into the corresponding element.

casc.colors

A 2-element vector of the color for the minimal and maximal class-wise sensitivity. The color palette is calcuated by an interpolation between the 2 given colors.

na.color

Color, which is used for indicating the empty elements (if the given class is not part of the cascade).

color.key

Specifies whether a color key is drawn (TRUE) or not (FALSE).

las

See par.

cex

See par.

cex.lab

See par.

srt

Angle used to rotate the strings of the x-axis and y-axis labels (see par).

...

Further arguments passed from other methods.

Details

This function plots a heatmap with the cascades of the Subcascades object in the rows and all classes present in any of the cascades in the columns. The colors indicate whether a given class is present in the corresponding cascade and with which sensitivity.

Value

No return value, called to generate the heatmap plot of the subcascades Object.

See Also

subcascades, plot.Conf, plot.ConfusionTable

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(TunePareto)
data(esl)
data <- esl$data
labels <- esl$labels
foldList <- generateCVRuns(labels  = labels,
                          ntimes      = 2,
                          nfold       = 2,
                          leaveOneOut = FALSE,
                          stratified  = TRUE)
predMap <- predictionMap(data, labels, foldList = foldList, 
                        classifier = tunePareto.svm(), kernel='linear')
# generate Subcascades object
subc <- subcascades(predMap,thresh=0.7,size=c(3,4))

plot(subc,row.sort='max')

ORION documentation built on Feb. 7, 2022, 5:15 p.m.