{"id":26722756,"url":"https://github.com/asadiahmad/image-classification-lda-and-pca","last_synced_at":"2025-03-27T20:36:55.064Z","repository":{"id":262521710,"uuid":"887511517","full_name":"AsadiAhmad/Image-Classification-LDA-and-PCA","owner":"AsadiAhmad","description":"Image Classification with Perceptron and LDA and PCA dimension reduction","archived":false,"fork":false,"pushed_at":"2024-11-12T21:12:40.000Z","size":281,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-12T22:21:34.667Z","etag":null,"topics":["dimension-reduction","image","image-classification","linear-discriminant-analysis","machine-learning","machine-learning-algorithms","mnist","mnist-classification","perseptron","perseptron-classification","principal-component-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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AsadiAhmad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-12T21:10:55.000Z","updated_at":"2024-11-12T21:19:09.000Z","dependencies_parsed_at":"2024-11-12T22:21:36.751Z","dependency_job_id":"bf860916-02aa-4f1c-961c-c11e4d860d3c","html_url":"https://github.com/AsadiAhmad/Image-Classification-LDA-and-PCA","commit_stats":null,"previous_names":["asadiahmad/image-classification-lda-and-pca"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsadiAhmad%2FImage-Classification-LDA-and-PCA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsadiAhmad%2FImage-Classification-LDA-and-PCA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsadiAhmad%2FImage-Classification-LDA-and-PCA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsadiAhmad%2FImage-Classification-LDA-and-PCA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsadiAhmad","download_url":"https://codeload.github.com/AsadiAhmad/Image-Classification-LDA-and-PCA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245922857,"owners_count":20694609,"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":["dimension-reduction","image","image-classification","linear-discriminant-analysis","machine-learning","machine-learning-algorithms","mnist","mnist-classification","perseptron","perseptron-classification","principal-component-analysis"],"created_at":"2025-03-27T20:36:54.594Z","updated_at":"2025-03-27T20:36:55.054Z","avatar_url":"https://github.com/AsadiAhmad.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image-Classification-LDA-and-PCA\nImage Classification with Perceptron and LDA and PCA dimension reduction\n\n## Tech :hammer_and_wrench: Languages and Tools :\n\n\u003cdiv\u003e\n  \u003cimg src=\"https://github.com/devicons/devicon/blob/master/icons/python/python-original.svg\" title=\"Python\" alt=\"Python\" width=\"40\" height=\"40\"/\u003e\u0026nbsp;\n  \u003cimg src=\"https://github.com/devicons/devicon/blob/master/icons/jupyter/jupyter-original.svg\" title=\"Jupyter Notebook\" alt=\"Jupyter Notebook\" width=\"40\" height=\"40\"/\u003e\u0026nbsp;\n  \u003cimg src=\"https://assets.st-note.com/img/1670632589167-x9aAV8lmnH.png\" title=\"Google Colab\" alt=\"Google Colab\" width=\"40\" height=\"40\"/\u003e\u0026nbsp;\n  \u003cimg src=\"https://github.com/devicons/devicon/blob/master/icons/numpy/numpy-original.svg\" title=\"Numpy\" alt=\"Numpy\" width=\"40\" height=\"40\"/\u003e\u0026nbsp;\n  \u003cimg src=\"https://github.com/devicons/devicon/blob/master/icons/pandas/pandas-original.svg\"  title=\"Pandas\" alt=\"Pandas\" width=\"40\" height=\"40\"/\u003e\u0026nbsp;\n  \u003cimg src=\"https://github.com/devicons/devicon/blob/master/icons/matplotlib/matplotlib-original.svg\"  title=\"MatPlotLib\" alt=\"MatPlotLib\" width=\"40\" height=\"40\"/\u003e\u0026nbsp;\n  \u003cimg src=\"https://cdn.worldvectorlogo.com/logos/seaborn-1.svg\"  title=\"seaborn\" alt=\"seaborn\" width=\"40\" height=\"40\"/\u003e\u0026nbsp;\n  \u003cimg src=\"https://github.com/devicons/devicon/blob/master/icons/tensorflow/tensorflow-original.svg\"  title=\"tensorflow\" alt=\"tensorflow\" width=\"40\" height=\"40\"/\u003e\u0026nbsp;\n  \u003cimg src=\"https://github.com/devicons/devicon/blob/master/icons/scikitlearn/scikitlearn-original.svg\"  title=\"Sci-kit Learn\" alt=\"Sci-kit Learn\" width=\"40\" height=\"40\"/\u003e\u0026nbsp;\n\u003c/div\u003e\n\n\n## Run the Notebook on Google Colab\n\nYou can easily run this code on google colab by just clicking this badge [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/AsadiAhmad/Image-Classification-LDA-and-PCA/blob/main/Image_Classification_with_LDA_%26_PCA.ipynb)\n\n## Conclusion\n\nIn this project, we demonstrated the application of LDA and PCA for effective dimensionality reduction in image classification tasks. In out analysis we found the LDA better than the PCA for dimension reduction task. Accuracy of the LDA is much better than PCA because LDA is supervised Learning and PCA is unsupervised learning method. Most of the time supervised Learning have better accuracy than unsupervised learning methods because supervised method using the labels but unsupervised does not.However when we don't have any labels then we can just use the unsupervised method.\n\nHere you can see BoxPlot of each method we have been used :\n\n### LDA BoxPlot\n\n\u003cimg src=\"/Pictures/BoxPlot-LDA.png\"/\u003e\n\n### PCA BoxPlot\n\n\u003cimg src=\"/Pictures/BoxPlot-PCA.png\"/\u003e\n\nYou can see better accuracy at LDA than the PCA method. Another conclusion we can get is look like when dimension reach a point like 9 to 25 dimension in PCA method our accuracy does not grow much show that our method is reaching its highest point of accuracy after that maybe we have overfit and you can see the overfitting and underfitting results down here :\n\n### LDA Results Table\n\n\u003cimg src=\"/Pictures/conclusion-table-LDA.JPG\"/\u003e\n\n### PCA Results Table\n\n\u003cimg src=\"/Pictures/conclusion-table-PCA.JPG\"/\u003e\n\n## Results\n\n### LDA Confusion Matrix\n\n\u003cimg src=\"/Pictures/Confusion-Matrix-LDA.png\"/\u003e\n\n### PCA Confusion Matrix\n\n\u003cimg src=\"/Pictures/Confusion-Matrix-PCA.png\"/\u003e\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasadiahmad%2Fimage-classification-lda-and-pca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasadiahmad%2Fimage-classification-lda-and-pca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasadiahmad%2Fimage-classification-lda-and-pca/lists"}