
Last chance! 50% off unlimited learning
Sale ends in
A function to calculate the apparent error rate of two classification
vectors, i.e., the proportion of observed cases incorrectly predicted.
It can be useful for evaluating discriminant analysis or other classification systems.
aer(obs, predict)
a vector containing the observed classes.
a vector with the same length of obs
containing the predicted classes.
The apparent error rate, a number between 0 (no agreement) and 1 (thorough agreement).
# NOT RUN {
data(iris)
da <- lda(Species ~ ., data = iris)
pred <- predict(da, dimen = 1)
aer(iris$Species, pred$class)
# End (not run)
# }
Run the code above in your browser using DataLab