klaR (version 0.4-1)

smrplot: Plotting of membership representation simplex

Description

For a 3 or 4 class discrimination problem the membership values of each class are visualized in a barycentric coordinate system.

Usage

smrplot(posterior, trueclass = NULL, center = FALSE, 
    col = rainbow(ncol(posterior)), pchest = rep(21, ncol(posterior)), 
    pchwrong = rep(20, ncol(posterior)), 
    pchclass = rep(19, ncol(posterior)), ...)

Arguments

posterior
(scaled) posteriori probabilities of different classes.
trueclass
vector of true classes (if known).
center
should the partitions to center be plotted?
col
colors to use for different classes.
pchest
pch symbol to use for estimated membership values.
pchwrong
pch symbol to use for misclassifications.
pchclass
pch symbol to mark the classes.
...
further graphical parameters to be passed to the underlying plot functions

References

Garczarek, Ursula Maria (2002): Classification rules in standardized partition spaces. Dissertation, University of Dortmund. URL http://eldorado.uni-dortmund.de:8080/FB5/ls7/forschung/2002/Garczarek

Examples

Run this code
library(MASS)
data(iris)
smrplot(predict(lda(Species ~ ., data = iris))$posterior, 
    trueclass = iris$Species, center = TRUE)

Run the code above in your browser using DataLab