classification {biplotEZ} | R Documentation |
Classification biplot method
Description
This function produces a list of elements to be used for constructing a classification biplot.
Usage
classification(bp, Pmat, dim.biplot = c(2, 1, 3), e.vects = 1:ncol(bp$X),
group.aes=NULL, axes = "regression", col=ez.col, opacity=0.4, borders = FALSE)
Arguments
bp |
an object of class |
Pmat |
a matrix containing the posterior probability for the classes |
dim.biplot |
dimension of the biplot. Only values 1, 2 and 3 are accepted, with default |
e.vects |
which eigenvectors (principal components) to extract, with default |
group.aes |
vector of the same length as the number of rows in the data matrix for differentiated aesthetics for samples. |
axes |
type of axes, defaults to "regression" |
col |
colour of the classification regions |
opacity |
opacity of classification regions |
borders |
logical, indicating whether borders should be added to classification regions |
Value
Object of class biplot with the following elements:
References
Gardner-Lubbe, S., 2016. A triplot for multiclass classification visualisation. Computational Statistics & Data Analysis, 94, pp.20-32.
Examples
biplot(iris[,1:4]) |>
classification(predict(MASS::lda(Species ~ ., data = iris))$posterior)
# create a classification biplot
biplot(iris[,1:4]) |>
classification(predict(MASS::lda(Species ~ ., data = iris))$posterior) |>
plot()