Skip to content

Image Classification with Perceptron and LDA and PCA dimension reduction

License

Notifications You must be signed in to change notification settings

AsadiAhmad/Image-Classification-LDA-and-PCA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Image-Classification-LDA-and-PCA

Image Classification with Perceptron and LDA and PCA dimension reduction

Tech 🛠️ Languages and Tools :

Python  Jupyter Notebook  Google Colab  Numpy  Pandas  MatPlotLib  seaborn  tensorflow  Sci-kit Learn 

Run the Notebook on Google Colab

You can easily run this code on google colab by just clicking this badge Open In Colab

Conclusion

In 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.

Here you can see BoxPlot of each method we have been used :

LDA BoxPlot

PCA BoxPlot

You 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 :

LDA Results Table

PCA Results Table

Results

LDA Confusion Matrix

PCA Confusion Matrix

License

This project is licensed under the MIT License.