Reproduce Fisher linear discriminant figure
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
Fisher's Linear Discriminant (FLD) is a method used in statistics and machine learning to find a linear combination of features that best separates two or more classes of objects or events. The key objective is to maximize the ratio of the difference between the means of the classes to the variation within each class. This provides a linear classifier or, more commonly, a dimensionality reduction technique.
Conceptual Background
Linear Discriminant Analysis
Fisher's Linear Discriminant is one component of Linear Discriminant Analysis (LDA), which assumes that different classes generate data based on different Gaussian distributions. LDA is widely used in pattern recognition and machine learning for dimension reduction and classification.
Mathematical Formulation
Given a set of data points belonging to two classes, the goal is to project the data onto a line such that the separation between the two classes is maximized. The separation is quantified in terms of the difference between projected means relative to the variances in each class.
If are feature vectors of the dataset and is the weight vector, the projection of these vectors is given by . The weight vector should be chosen so that it maximizes Fisher’s criterion:
where:
• and are the means of the projected data for class 1 and class 2, respectively. • and are the variances of the projected data for class 1 and class 2, respectively.
Computing the Optimal Weight Vector
To find the weight vector, , that maximizes , we solve:
Where the within-class scatter matrix is defined as:
Example
Consider a simple dataset with two-dimensional features. We have two classes:
• Class 1: Points: (2, 3), (3, 4), (4, 5) • Class 2: Points: (1, 0), (0, -1), (-1, -2)
- Mean Calculation: Compute the means and . • •
- Scatter Matrices: • Compute using data points and means.
- Weight Vector: • Compute .
These computations will lead to the optimal direction we seek for projecting data to maximize class separation.
Summary Table
| Aspect | Explanation |
| Method | Fisher's Linear Discriminant |
| Goal | Maximize class separation by linear projection |
| Criterion | |
| Optimal Weight Vector | |
| Within-Class Scatter | |
| Example Classes | Class 1: (2, 3), (3, 4), (4, 5) Class 2: (1, 0), (0, -1), (-1, -2) |
Conclusion
Fisher's Linear Discriminant provides a simplistic yet powerful method for linear separation and dimensionality reduction. By finding the optimal projection direction, FLD enhances the ability to distinguish between classes highlighting significant directions in the feature space. Its methodological strength lies in balancing separation between class means with within-class variance, a principle that extends to many modern machine learning approaches.

