plot.PredictionMap: Heatmap of a PredictionMap Object

Description Usage Arguments Details Value See Also Examples

View source: R/plot.R

Description

Plots a heatmap, that shows the predictions of a PredictionMap object and the real labels in a cross-validation or reclassification experiment.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## S3 method for class 'PredictionMap'
plot(
  x = NULL,
  xlab = "samples",
  ylab = "base classifiers",
  main = "Prediction map",
  las = 1,
  srt = 30,
  cex = 1,
  cex.lab = 1,
  label.colors = NULL,
  plot.sampleIDs = FALSE,
  plot.cv.runs = TRUE,
  plot.class.labels = TRUE,
  ...
)

Arguments

x

A PredictonMap object as it is returned by predictionMap-function.

xlab

A title for the x axis (see plot).

ylab

A title for the y axis (see plot).

main

See plot.

las

See par.

srt

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

cex

See par.

cex.lab

See par.

label.colors

A vector of the color for the class labels. If NULL, automatically use rainbow color scheme.

plot.sampleIDs

Specifices if the sample IDs should be plotted along the x axis (TRUE or FALSE).

plot.cv.runs,

Specifices if the cross-validation runs should be plotted (TRUE or FALSE). Cross-validation runs are visually separated by straight lines.

plot.class.labels

Specificies if the numerical class labels should additionally plotted (TRUE or FALSE).

...

Further arguments passed from other methods.

Details

This function plots a heatmap with color-decoded predictions made by the specified classifier. Here, the rows indicate the different binary base classifiers and the columns the samples in the specified resampling experiment (reclassification or cross-validation). Labels are visualized in the top row and decoded color-wise.

Value

No return value, called to a heatmap plot of the predictionMap Object.

See Also

predictionMap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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')

plot(predMap)

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