Abstract: Large-sample data became prevalent as data acquisition became cheaper and easier. While a large sample size has theoretical advantages for many statistical methods, it presents computational challenges. Sketching, or compression, is a well-studied approach to address these issues in regression settings, but considerably less is known about its performance in classification settings. Here we consider the computational issues due to large sample size within the discriminant analysis framework. We propose a new compression approach for reducing the number of training samples for linear and quadratic discriminant analysis, in contrast to existing compression methods which focus on reducing the number of features. We support our approach with a theoretical bound on the misclassification error rate compared to the Bayes classifier. Empirical studies confirm the significant computational gains of the proposed method and its superior predictive ability compared to random sub-sampling.
Introduction
In the era of big data, researchers often face datasets with massive sample sizes ($n$). While statistically advantageous, large $n$ presents a significant computational burden for classical algorithms like Linear Discriminant Analysis (LDA). When $n$ reaches millions, even with a moderate number of features ($p$), calculating the within-class covariance matrix—a step with $O(np^2)$ complexity—becomes a bottleneck.
In "Compressing Large Sample Data for Discriminant Analysis," Alexander F. Lapanowski and Irina Gaynanova introduce "Compressed LDA," a method using sparse random projections to reduce training samples while preserving classification accuracy and enabling significant speedups.
Methodology: Separate Class Compression
The core innovation of this work is Separate Class Compression. Traditional "joint" compression methods often mix samples from different classes, making it impossible to assign labels to the resulting compressed data.
Instead, the authors compress each class independently using a sparse Rademacher matrix. For each class $g$, $n_g$ samples are projected down to $m_g$ synthetic samples ($m \ll n$). This approach offers several advantages:
- Label Preservation: Class identities remain unambiguous, allowing for the estimation of class-specific means and covariance matrices.
- Computational Efficiency: Using sparse matrices results in a compression complexity of $O(nmps)$, where $s$ is the sparsity level.
- QDA Extension: Because class identity is preserved, this is the first sketching-based approach applicable to Quadratic Discriminant Analysis (QDA), which requires separate covariance matrices for each class.
Key Insights and Ideas
A significant finding is that compression can help LDA and QDA handle non-normal data. Since each compressed sample is a weighted sum of many original samples, the Central Limit Theorem ensures the compressed data is more Gaussian, better aligning with the underlying assumptions of discriminant analysis.
Furthermore, compression proves superior to simple random sub-sampling. While sub-sampling relies on the "luck of the draw" from a subset of rows, compression incorporates information from the entire dataset to create synthetic samples. This results in significantly lower variance in error rates, as seen in the comparison for QDA.
Empirical Evaluation and Results
The authors validated their approach using four datasets: Zip Code, MNIST, Skin Segmentation, and Eye State.
The results demonstrate that Compressed LDA and its variant, Projected LDA, consistently outperform joint compression methods like "Fast Random Fisher" and random sub-sampling. In terms of speed, compression offers substantial gains. For instance, on the MNIST dataset, constructing the covariance matrix with the full data took approximately 23.5 seconds, while compression ($m=10,000$) reduced this to 9.3 seconds—a 2.5x speedup with negligible accuracy loss.
Conclusion and Future Work
Compressed LDA provides a robust framework for scaling discriminant analysis to large datasets. By focusing on sample reduction rather than feature reduction, it maintains high accuracy and stability.
Future research may explore hybrid approaches that combine sample and feature compression for high-dimensional, large-scale data. Additionally, extending these principles to non-linear methods like Kernel Discriminant Analysis could further enhance classification flexibility in big data contexts.
Summary updated