{"id":22927602,"url":"https://github.com/demon-2-angel/handwritten-digit-classification","last_synced_at":"2025-04-01T15:43:44.309Z","repository":{"id":211042381,"uuid":"728054014","full_name":"Demon-2-Angel/Handwritten-Digit-Classification","owner":"Demon-2-Angel","description":"This document explores the use of Principal Component Analysis (PCA) in a machine learning context, specifically for image classification using a dataset of numerical representations of digits. The dataset is loaded using sci-kit-learn's load_digits function, and initial exploration is conducted to understand its structure.","archived":false,"fork":false,"pushed_at":"2023-12-06T06:09:37.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T10:15:32.928Z","etag":null,"topics":["digits-recognition","feature-extraction","model-checking","pca-analysis"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Demon-2-Angel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-12-06T06:04:18.000Z","updated_at":"2023-12-06T06:17:33.000Z","dependencies_parsed_at":"2023-12-06T07:56:01.408Z","dependency_job_id":"93e691cb-d136-4c72-8085-3be3442e2dbd","html_url":"https://github.com/Demon-2-Angel/Handwritten-Digit-Classification","commit_stats":null,"previous_names":["demon-2-angel/handwritten-digit-classification"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demon-2-Angel%2FHandwritten-Digit-Classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demon-2-Angel%2FHandwritten-Digit-Classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demon-2-Angel%2FHandwritten-Digit-Classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Demon-2-Angel%2FHandwritten-Digit-Classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Demon-2-Angel","download_url":"https://codeload.github.com/Demon-2-Angel/Handwritten-Digit-Classification/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246666916,"owners_count":20814615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["digits-recognition","feature-extraction","model-checking","pca-analysis"],"created_at":"2024-12-14T09:15:10.553Z","updated_at":"2025-04-01T15:43:44.289Z","avatar_url":"https://github.com/Demon-2-Angel.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Handwritten-Digit-Classification\n\n# Introduction to PCA\n\n## Overview\nThis document explores the use of Principal Component Analysis (PCA) in a machine learning context, specifically for image classification using a dataset of numerical representations of digits. The dataset is loaded using sci-kit-learn's `load_digits` function, and initial exploration is conducted to understand its structure.\n\n## Dataset Exploration\nThe dataset consists of 1797 images, each represented by 64 numerical features (8x8 pixel values). The target variable represents the digit each image corresponds to (ranging from 0 to 9). After loading the data, a data frame is created for easier analysis.\n\n## Preparing the Model\nTo train a machine learning model, the features are scaled using `StandardScaler` and the data is split into training and testing sets. A Logistic Regression model is then trained on the original dataset, and its accuracy is evaluated.\n\n## Applying PCA\nPrincipal Component Analysis (PCA) is employed to reduce the dimensionality of the dataset. The number of principal components is chosen based on the desired variance to be retained. The explained variance ratio and the number of components are examined. Another Logistic Regression model is trained on the reduced dataset, and its accuracy is evaluated.\n\n## Conclusion\nThe document concludes with a summary table showcasing the impact of different levels of retained variance on the model's accuracy after applying PCA. This analysis provides insights into the trade-off between dimensionality reduction and model accuracy. The table indicates that as we reduce the dimensionality (and retain less variance), there is a gradual decrease in accuracy, demonstrating the importance of finding a balance between dimensionality reduction and model performance.\n\n| Variance Selected | Features Retained | Accuracy |\n| ------------------ | ----------------- | -------- |\n| 95                | 27                | 96.9     |\n| 90                | 21                | 96.3     |\n| 85                | 17                | 95       |\n| 80                | 13                | 94.4     |\n| 75                | 11                | 93.05    |\n| 70                | 9                 | 93.88    |\n| 65                | 8                 | 90.83    |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemon-2-angel%2Fhandwritten-digit-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdemon-2-angel%2Fhandwritten-digit-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdemon-2-angel%2Fhandwritten-digit-classification/lists"}