Learn R Programming

ORION (version 1.0.3)

plot.PredictionMap: Heatmap of a PredictionMap Object

Description

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

Usage

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

Value

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

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.

See Also

predictionMap

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')

plot(predMap)

# }

Run the code above in your browser using DataLab