## Not run:
# # load iris dataset
# data(iris)
#
# # quadratic discriminant analysis with no validation
# my_qua1 = quaDA(iris[,1:4], iris$Species)
# my_qua1$confusion
# my_qua1$error_rate
#
# # quadratic discriminant analysis with cross-validation
# my_qua2 = quaDA(iris[,1:4], iris$Species, validation="crossval")
# my_qua2$confusion
# my_qua2$error_rate
#
# # quadratic discriminant analysis with learn-test validation
# learning = c(1:40, 51:90, 101:140)
# testing = c(41:50, 91:100, 141:150)
# my_qua3 = quaDA(iris[,1:4], iris$Species, validation="learntest",
# learn=learning, test=testing)
# my_qua3$confusion
# my_qua3$error_rate
# ## End(Not run)
Run the code above in your browser using DataLab