{"id":20448929,"url":"https://github.com/shriram-vibhute/digit_classification","last_synced_at":"2025-10-28T07:04:34.905Z","repository":{"id":252448631,"uuid":"839311353","full_name":"Shriram-Vibhute/Digit_Classification","owner":"Shriram-Vibhute","description":"This project demonstrates various machine learning techniques for classifying handwritten digits from the MNIST dataset. It covers data preprocessing, model training, evaluation, and advanced classification strategies.","archived":false,"fork":false,"pushed_at":"2024-08-09T20:03:59.000Z","size":809,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-15T22:26:44.728Z","etag":null,"topics":["classification","data-analysis","data-visualization","machine-learning","matplotlib","numpy","pandas","sk-learn"],"latest_commit_sha":null,"homepage":"https://github.com/Shriram-Vibhute/Digit_Classification","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/Shriram-Vibhute.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-07T11:00:43.000Z","updated_at":"2024-08-12T18:34:23.000Z","dependencies_parsed_at":"2024-08-09T21:17:57.267Z","dependency_job_id":null,"html_url":"https://github.com/Shriram-Vibhute/Digit_Classification","commit_stats":null,"previous_names":["shriram-vibhute/digit_classification"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shriram-Vibhute%2FDigit_Classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shriram-Vibhute%2FDigit_Classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shriram-Vibhute%2FDigit_Classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shriram-Vibhute%2FDigit_Classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shriram-Vibhute","download_url":"https://codeload.github.com/Shriram-Vibhute/Digit_Classification/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241997528,"owners_count":20055118,"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":["classification","data-analysis","data-visualization","machine-learning","matplotlib","numpy","pandas","sk-learn"],"created_at":"2024-11-15T10:37:47.098Z","updated_at":"2025-10-28T07:04:29.875Z","avatar_url":"https://github.com/Shriram-Vibhute.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MNIST Image Classification 🧑🏼‍💻🔢🚀\n\n![image](https://github.com/user-attachments/assets/41f9e668-6b01-4ebc-8250-786d9b3f98f7)\n\nThis project demonstrates various machine learning techniques for classifying handwritten digits from the MNIST dataset. It covers data preprocessing, model training, evaluation, and advanced classification strategies.\n\n## Table of Contents\n\n- [Project Overview](#project-overview)\n- [Setup and Installation](#setup-and-installation)\n- [Data Overview](#data-overview)\n- [Data Visualization](#data-visualization)\n- [Model Training](#model-training)\n- [Model Evaluation](#model-evaluation)\n- [Multi-Class Classification](#multi-class-classification)\n- [Multi-Label Classification](#multi-label-classification)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Project Overview\n\nThe project focuses on image classification using the MNIST dataset, which contains 70,000 grayscale images of handwritten digits. We explore binary classification for detecting a specific digit, multiclass classification for all digits, and multi-label classification for scenarios where multiple labels may apply.\n\n## Setup and Installation\n\nTo get started, clone the repository and install the required Python libraries. The project uses libraries like NumPy, pandas, Matplotlib, Scikit-learn, and Seaborn for data manipulation, visualization, and modeling. Follow the instructions in the [setup script](setup.py) to install dependencies.\n\n## Data Overview\n\nThe MNIST dataset consists of 60,000 training images and 10,000 test images, each of size 28x28 pixels. Each image is labeled with a digit from 0 to 9. The dataset is well-balanced, though some digits are slightly more frequent than others.\n\n## Data Visualization\n\nWe visualized individual and multiple digits from the dataset to understand the data better. Examples include displaying a single digit as a heatmap and plotting multiple digits in a grid to observe their variations.\n\n## Model Training\n\n### Binary Classification\n\nInitially, we focused on a binary classification task to detect the digit '5' using the `SGDClassifier`. We transformed the labels into binary format and trained the model. A dummy classifier was used as a baseline for comparison.\n\n### Multiclass Classification\n\nWe extended the classification problem to handle all ten digits using the `SVC` (Support Vector Classifier) and the `RandomForestClassifier`. Techniques like one-vs-one and one-vs-all strategies were used to manage multiple classes.\n\n## Model Evaluation\n\n### Performance Metrics\n\nWe evaluated the models using accuracy, precision, recall, and F1-score. Precision-recall curves and ROC curves were plotted to visualize the trade-offs and overall performance of different classifiers.\n\n### Cross-Validation\n\nCross-validation was employed to assess the robustness of the models. We used methods like `cross_val_score` and `cross_val_predict` to obtain reliable performance metrics and validate the models' effectiveness.\n\n## Multi-Class Classification\n\nFor the MNIST dataset, we implemented both one-vs-one and one-vs-all strategies. We used `SVC` and `RandomForestClassifier` to handle multi-class classification, analyzing the performance of each method.\n\n## Multi-Label Classification\n\nWe explored multi-label classification by creating labels for digits greater than or equal to 7 and odd digits. The `KNeighborsClassifier` was used for this task, and the performance was evaluated using metrics like the F1-score.\n\n## Contributing\n\nContributions to this project are welcome! Please submit issues, pull requests, or suggestions for improvements. Ensure that your contributions align with the project's goals and coding standards.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshriram-vibhute%2Fdigit_classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshriram-vibhute%2Fdigit_classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshriram-vibhute%2Fdigit_classification/lists"}