Linear Discriminant Analysis
摘要
This chapter shows how to compute linear discriminant analysis (LDA), a statistical technique used for classification and dimensionality reduction. Unlike PCA, which aims to find a linear combination of variables that maximizes variance, LDA seeks a linear combination that best separates the classes in the dataset. To understand how LDA works, we will first calculate it “by hand” in R and then use the lda function to perform the same calculations with a single line of code.