Linear Manifold Geometry and Neighborhood Classification of Handwritten Digit Images
DOI:
https://doi.org/10.65310/zz8g5m33Keywords:
dimensionality reduction, handwritten digits, k-nearest neighbors, manifold geometry, principal component analysisAbstract
Handwritten digit images are represented by correlated pixel intensities, but low-dimensional visualization need not preserve the information required for recognition. This study quantifies that distinction using 1,797 grayscale images from the scikit-learn optical digits dataset. Standardized principal component analysis (PCA), neighborhood trustworthiness, and stratified five-fold validation of a five-nearest-neighbor classifier were supplemented by variance-threshold, neighborhood-size, and nonlinear-embedding comparisons. The first two principal components explain 21.59% of standardized variance, whereas 31 components retain 90.046%. Two-dimensional PCA yields trustworthiness of 0.816 at ten neighbors, compared with 0.986 for t-distributed stochastic neighbor embedding (t-SNE). Five-nearest-neighbor classification achieves 97.38% mean accuracy (SD 0.72 percentage points) with 90% variance retention, 52.92% in two dimensions, and 97.89% without PCA. Pooled out-of-fold macro-F1 is 0.974 for the 90% pipeline. The results demonstrate that exploratory projection quality, linear variance compression, and classification performance constitute distinct empirical properties. PCA provides substantial compression with a small observed accuracy cost relative to the uncompressed baseline, rather than an established accuracy improvement. The evidence is consistent with structured digit geometry but does not establish nonlinear intrinsic manifold dimensionality.
Downloads
References
Becht, E., McInnes, L., Healy, J., Dutertre, C.-A., Kwok, I. W. H., Ng, L. G., Ginhoux, F., & Newell, E. W. (2019). Dimensionality reduction for visualizing single-cell data using UMAP. Nature Biotechnology, 37, 38–44. https://doi.org/10.1038/nbt.4314
Belkin, M., & Niyogi, P. (2003). Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15, 1373–1396.
Belkin, M., Hsu, D., Ma, S., & Mandal, S. (2019). Reconciling modern machine-learning practice and the classical bias–variance trade-off. Proceedings of the National Academy of Sciences, 116(32), 15849–15854. https://doi.org/10.1073/pnas.1903070116
Cayton, L. (2005). Algorithms for manifold learning. University of California, San Diego Technical Report.
Chicco, D., & Jurman, G. (2020). The advantages of the Matthews correlation coefficient over F1 score and accuracy in binary classification evaluation. BMC Genomics, 21, 6. https://doi.org/10.1186/s12864-019-6413-7
Cover, T. M., & Hart, P. E. (1967). Nearest neighbor pattern classification. IEEE Transactions on Information Theory, 13(1), 21–27. https://doi.org/10.1109/TIT.1967.1053964
Deng, L. (2012). The MNIST database of handwritten digit images for machine learning research. IEEE Signal Processing Magazine, 29(6), 141–142.
Espadoto, M., Martins, R. M., Kerren, A., Hirata, N. S. T., & Telea, A. C. (2021). Toward a quantitative survey of dimension reduction techniques. IEEE Transactions on Visualization and Computer Graphics, 27, 2153–2173.
Fefferman, C., Mitter, S., & Narayanan, H. (2016). Testing the manifold hypothesis. Journal of the American Mathematical Society, 29, 983–1049.
Hamm, K., & Korzeniowski, A. (2024). On Wasserstein distances for affine transformations of random vectors. Foundations of Data Science, 6(4), 468–491. https://doi.org/10.3934/fods.2024023
Hamm, T., & Steinwart, I. (2022). Intrinsic dimension adaptive partitioning for kernel methods. SIAM Journal on Mathematics of Data Science, 4(2), 721–749. https://doi.org/10.1137/21M1435690
Jazayeri, M., & Ostojic, S. (2021). Interpreting neural computations by examining intrinsic and embedding dimensionality of neural activity. Current Opinion in Neurobiology, 70, 113–120. https://doi.org/10.1016/j.conb.2021.08.002
Jolliffe, I. T., & Cadima, J. (2016). Principal component analysis: A review and recent developments. Philosophical Transactions of the Royal Society A, 374, 20150202. https://doi.org/10.1098/rsta.2015.0202
Kapoor, S., & Narayanan, A. (2023). Leakage and the reproducibility crisis in machine-learning-based science. Patterns, 4(9), 100804. https://doi.org/10.1016/j.patter.2023.100804
Kobak, D., & Berens, P. (2019). The art of using t-SNE for single-cell transcriptomics. Nature Communications, 10, 5416. https://doi.org/10.1038/s41467-019-13056-x
LeCun, Y., Bottou, L., Bengio, Y., & Haffner, P. (1998). Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86, 2278–2324.
Lever, J., Krzywinski, M., & Altman, N. (2017). Principal component analysis. Nature Methods, 14, 641–642. https://doi.org/10.1038/nmeth.4346
Lundberg, S. M., Erion, G., Chen, H., DeGrave, A., Prutkin, J. M., Nair, B., Katz, R., Himmelfarb, J., Bansal, N., & Lee, S.-I. (2020). From local explanations to global understanding with explainable AI for trees. Nature Machine Intelligence, 2, 56–67. https://doi.org/10.1038/s42256-019-0138-9
McInnes, L., Healy, J., & Melville, J. (2018). UMAP: Uniform manifold approximation and projection for dimension reduction. arXiv:1802.03426.
Pineau, J., Vincent-Lamarre, P., Sinha, K., Larivière, V., Beygelzimer, A., d’Alché-Buc, F., Fox, E., & Larochelle, H. (2021). Improving reproducibility in machine learning research. Journal of Machine Learning Research, 22(164), 1–20.
Probst, P., Wright, M. N., & Boulesteix, A.-L. (2019). Hyperparameters and tuning strategies for random forest. WIREs Data Mining and Knowledge Discovery, 9(3), e1301. https://doi.org/10.1002/widm.1301
Raschka, S., Patterson, J., & Nolet, C. (2020). Machine learning in Python: Main developments and technology trends in data science, machine learning, and artificial intelligence. Information, 11(4), 193. https://doi.org/10.3390/info11040193
Roweis, S. T., & Saul, L. K. (2000). Nonlinear dimensionality reduction by locally linear embedding. Science, 290, 2323–2326.
Rudin, C. (2019). Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nature Machine Intelligence, 1, 206–215. https://doi.org/10.1038/s42256-019-0048-x
Sainburg, T., McInnes, L., & Gentner, T. Q. (2021). Parametric UMAP embeddings for representation and semisupervised learning. Neural Computation, 33(11), 2881–2907. https://doi.org/10.1162/neco_a_01434
Sarker, I. H. (2021). Machine learning: Algorithms, real-world applications and research directions. SN Computer Science, 2, 160. https://doi.org/10.1007/s42979-021-00592-x
Scikit-learn developers. (2026). Optical recognition of handwritten digits dataset documentation (version 1.8). Scikit-learn. https://scikit-learn.org/1.8/modules/generated/sklearn.datasets.load_digits.html
Tenenbaum, J. B., de Silva, V., & Langford, J. C. (2000). A global geometric framework for nonlinear dimensionality reduction. Science, 290, 2319–2323.
Vabalas, A., Gowen, E., Poliakoff, E., & Casson, A. J. (2019). Machine learning algorithm validation with a limited sample size. PLOS ONE, 14(11), e0224365. https://doi.org/10.1371/journal.pone.0224365
van der Maaten, L., & Hinton, G. (2008). Visualizing data using t-SNE. Journal of Machine Learning Research, 9, 2579–2605.
Watson, D. (2024). Effective theory building and manifold learning. Synthese, 204. https://doi.org/10.1007/s11229-024-04844-0









