plot.Groupwise: Heatmap of a Groupwise 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 Groupwise object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## S3 method for class 'Groupwise'
plot(
  x = NULL,
  class.sort = "",
  row.sort = "sens",
  main = "groupwise",
  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 Groupwise object as it is returned by groupwise-function.

class.sort

The classes can be sorted either according to the first cascade in the Groupwise object (”), or based on the class frequency ('max').

row.sort

The cascade can be sorted either based on the maximal-minimal class-wise sensitivity ('sens') or according the class frequency.

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 Groupwise 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. Internally converts the Groupwise object to a Subcascades object and plots the corresponding heatmap.

Value

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

See Also

groupwise, subcascades, plot.Subcascades

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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))
groupwise <- groupwise(subc)

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

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