Linear Discrimination
Finds the coefficients and constants for Fisher's linear discrimination function in (11.31) and (11.32).
lda(x, y)
x
: The data matrix.y
: The -vector of group identities, assumed to be given by the numbers 1,..., for groups.A list with the following components:
# Iris example x.iris <- as.matrix(iris[, 1:4]) # Gets group vector (1, ... , 1, 2, ... , 2, 3, ..., 3) y.iris <- rep(1:3, c(50, 50, 50)) ld.iris <- lda(x.iris, y.iris)
sweep
Useful links
Downloads (last 30 days):