$24
Implement Linear Discriminant Analysis (LDA) and Quadratic Discriminant Analysis (QDA). You can use Python, R or Matlab for this assignment. Please do not use any machine learning library for this assignment. Perform classifications on the Iris dataset which can be downloaded at http://www.cse.scu.edu/~yfang/coen140/iris.data
The dataset contains 3 classes of 50 instances each, where each class refers to a type of iris plant.
Attribute Information:
sepal length in cm
sepal width in cm
petal length in cm
petal width in cm
class:
Iris Setosa
Iris Versicolour
Iris Virginica
Exercises:
Break the sample into 80% for training, and 20% for test datasets. You can choose the first 80% instances from each class for training and the rest for testing.
Build an LDA classifier based on the training data. Report the training and test errors for your classifier.
Build a QDA classifier based on the training data. Report the training and test errors for your classifier.
Is there any class linearly separable from other classes? Explain your answer based on your experiments.
Are any of the variables not important in classifying iris type? Explain your answer based on your experiments.
Assume the features are independent, i.e., ∑ is a diagonal matrix. Repeat 2 and 3, and report your results.