classification.Rd
This function produces a list of elements to be used for constructing a classification biplot.
an object of class biplot
obtained from preceding function biplot()
.
a matrix containing the posterior probability for the classes
dimension of the biplot. Only values 1, 2 and 3 are accepted, with default 2
.
which eigenvectors (principal components) to extract, with default 1:dim.biplot
.
vector of the same length as the number of rows in the data matrix for differentiated aesthetics for samples.
type of axes, defaults to "regression"
colour of the classification regions
opacity of classification regions
logical, indicating whether borders should be added to classification regions
Object of class biplot with the following elements:
Gardner-Lubbe, S., 2016. A triplot for multiclass classification visualisation. Computational Statistics & Data Analysis, 94, pp.20-32.
biplot(iris[,1:4]) |>
classification(predict(MASS::lda(Species ~ ., data = iris))$posterior)
#> Object of class biplot, based on 150 samples and 4 variables.
#> 4 numeric variables.
# create a classification biplot
biplot(iris[,1:4]) |>
classification(predict(MASS::lda(Species ~ ., data = iris))$posterior) |>
plot()
#> Warning: no non-missing arguments to min; returning Inf