Learn R Programming

ORION (version 1.0.3)

plot.Subcascades: Heatmap of a Subcascades Object

Description

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

Usage

# S3 method for 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.

Value

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

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.

See Also

subcascades, plot.Conf, plot.ConfusionTable

Examples

Run this code
# NOT RUN {
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')

# }

Run the code above in your browser using DataLab