@@ -51,16 +51,16 @@ The effectiveness of the KNN algorithm was evaluated based on the number of neig
...
@@ -51,16 +51,16 @@ The effectiveness of the KNN algorithm was evaluated based on the number of neig
### Running the Code
### Running the Code
To execute the models, follow these steps in the terminal:
To execute the models, follow these steps in the terminal:
bash
# Ensure requirements are installed before running KNN or MLP
# Ensure requirements are installed before running KNN or MLP
pip install -r requirements.txt
pip install -r requirements.txt
1. KNN Model:
1. KNN Model:
bash
python knn.py
python knn.py
2. MLP Model:
2. MLP Model:
bash
python mlp.py
python mlp.py
## Results :
## Results :
...
@@ -79,7 +79,7 @@ A graph showing the accuracy variation with the number of epochs was generated u
...
@@ -79,7 +79,7 @@ A graph showing the accuracy variation with the number of epochs was generated u


## Analysis of KNN Results
## Analysis of KNN Results
Unfortunately, the performance of the KNN algorithm was disappointing, with accuracy ranging between 33% and 36% for different values of k (up to k=20). Several reasons may explain these mixed results:
Unfortunately, the performance of the KNN algorithm was disappointing, with accuracy ranging between 33% and 34% for different values of k (up to k=20). Several reasons may explain these mixed results:
1.*High Dimensionality of Data*: CIFAR-10 dataset images are 32x32 pixels, resulting in high-dimensional data. This can make Euclidean distance less discriminative, affecting KNN's performance.
1.*High Dimensionality of Data*: CIFAR-10 dataset images are 32x32 pixels, resulting in high-dimensional data. This can make Euclidean distance less discriminative, affecting KNN's performance.
...
@@ -95,7 +95,7 @@ The deep learning algorithm (ANN) used for our dataset has relatively low perfor
...
@@ -95,7 +95,7 @@ The deep learning algorithm (ANN) used for our dataset has relatively low perfor
These results suggest that adjustments to certain aspects of the model, such as complexity, hyperparameters, or weight initialization, may be necessary to improve its ability to generalize to new data. Further exploration of these aspects could be beneficial in optimizing model performance.
These results suggest that adjustments to certain aspects of the model, such as complexity, hyperparameters, or weight initialization, may be necessary to improve its ability to generalize to new data. Further exploration of these aspects could be beneficial in optimizing model performance.
## Conculsion
## Conculsion
The best accuracy is achieved with the KNN model, reaching 36%. However, it could be further improved by using Convolutional Neural Networks (CNN) instead of Artificial Neural Networks (ANN). CNNs are particularly recognized for their effectiveness in image recognition, analysis, and classification of images and videos.
The best accuracy is achieved with the KNN model, reaching 34%. However, it could be further improved by using Convolutional Neural Networks (CNN) instead of Artificial Neural Networks (ANN). CNNs are particularly recognized for their effectiveness in image recognition, analysis, and classification of images and videos.