| plot.MCRestimate {MCRestimate} | R Documentation |
plot.MCRestimate visualizes a 'vote matrix'. A 'vote matrix' is the result of a classification procedure. For every sample (=row) i and every class (=column) j the matrix element [i,j] is the probability or frequency the classification method predicts sample i as a member of class j.
## S3 method for class 'MCRestimate':
plot(x,
class.factor=NULL,
rownames.from.object=FALSE,
sample.order=TRUE,
legend=FALSE,
mypalette=NULL,
shading=NULL,
xlab="Sample ID",
ylab="Frequency of correct classification",
cex.axis=1,...)
x |
Object of S3 class MCRestimate or a matrix |
class.factor |
Factor. Its length must match the number of rows
in x and the levels must be the same as the colnames in x.
If x is of class MCRestimate this argument will be ignored. |
rownames.from.object |
Logical. If TRUE then the rownames of the
matrix or the sample names of MCRestimate in x are used as labels for the x-axis |
sample.order |
Logical. If TRUE then the samples are ordered by class membership |
legend |
Logical. If TRUE then there will be a small legend in the output |
mypalette |
|
shading |
|
xlab |
Character |
ylab |
Character |
cex.axis |
numeric |
... |
Further arguments that are passed on to plot.default |
The function is called for its side effect, creating a plot on the active graphics device.
Markus Ruschhaupt mailto:m.ruschhaupt@dkfz.de
library(MCRestimate)
x <- c(0.5, 0.3, 0.7, 0.3, 0.8, 0.2, 0.3)
mat2 <- cbind(x, 1-x)
fac2 <- factor(c("low", rep("high", 3), rep("low", 3)))
colnames(mat2) <- levels(fac2)
mat3 <- cbind(x/3, 2*x/3, 1-x)
fac3 <- factor(c(rep("high", 3), rep("intermediate", 2), rep("low", 2)))
colnames(mat3) <- levels(fac3)
if (interactive()) {
x11(width=9, height=9)
par(mfrow=c(3,1))}
plot.MCRestimate(mat2, fac2)
plot.MCRestimate(mat2, fac2, sample.order=FALSE)
plot.MCRestimate(mat3, fac3)