Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README Enhancement - Avocados Classification #480

Merged
merged 6 commits into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 98 additions & 25 deletions Avocados Classification/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,98 @@
# Avocados Classification
## SOCIAL SUMMER OF CODE-2023 /World-of-ML/DL-Simplified#361


Full name : Harsh Raj

GitHub Profile Link : https://github.com/RAJharsh02

Email ID : harshraj2828@gmail.com


What is your participant role? SSOC23



Approach for this Project:The project aimed to predict whether an avocado is conventional or organic. using Deep learning models. The dataset was loaded and explored to gain insights into the data, followed by preprocessing steps such as handling missing values and feature scaling. Three models were developed: Feedforward Neural Network (FNN),TabNet, and Long Short-Term Memory (LSTM). Each model was trained and evaluated based on accuracy.

## Models:-
![carbon (10)](https://github.com/RAJharsh02/Avocados-classification/assets/118257196/e23ec958-273d-4b90-b886-a524c1a19361)
![carbon (11)](https://github.com/RAJharsh02/Avocados-classification/assets/118257196/aa719f26-aaa6-404a-9821-6c33f1f90e5b)
![carbon (12)](https://github.com/RAJharsh02/Avocados-classification/assets/118257196/05bf34fc-0749-470f-ab85-48298aee2d51)


## Accuracy Score of different Model:
![Comparison graph](https://github.com/RAJharsh02/Avocados-classification/assets/118257196/60225a7c-e5eb-4904-8ec4-db7f079e2d60)
<h1>Avocados Classification</h1>

🎯**GOAL**

The project aims to predict whether an avocado is conventional or organic using Deep learning models.

🧵**DATASET**

https://www.kaggle.com/datasets/neuromusic/avocado-prices

🧾**DESCRIPTION**

The main goal of this project is to develop a Dl model that can accurately predict whether an avocado is conventional or organic based on various features such as `Size of Bags`,`Volume`,`Price` etc. The purpose of this project is to categorize avocados for better market segmentation and analysis

🧮**WHAT I HAD DONE**


1. Data loading and exploration: Loaded the dataset, examined its structure, and performed initial exploratory data analysis (EDA) to gain insights into the data distribution, missing values, and relationships between variables.

2. Data preprocessing: Conducted data preprocessing steps such as handling missing values, encoding categorical variables, and scaling numerical features to prepare the data for model training.

3. Feature selection: Applied feature selection techniques to identify the most relevant features that contribute significantly to the prediction of heart strokes. This helps in reducing model complexity and improving performance.

4. Model development: Three models were developed: Feedforward Neural Network (FNN),TabNet, and Long Short-Term Memory (LSTM). Each model was trained and evaluated based on accuracy.

🚀**Models Implemented**
```bash
a.LSTM (Long Short-Term Memory In avocado classification, LSTM
classifies by taking sequential input data and processing it through
memory cells, which learn to retain relevant information. It builds the
model using multiple LSTM layers to capture complex patterns, and then
applies a dense layer for final classification based on the learned
temporal dependencies, resulting in accurate avocado classification.
```
```bash
b. Feedforward Neural Network (FNN): Developed an FNN model using the Keras library
with multiple hidden layers and appropriate activation functions. Trained the model using
the preprocessed data and fine-tuned hyperparameters to achieve optimal performance.
```
```bash
c. Recurrent Neural Network (RNN): TABNET classifies using a unique
attention mechanism that selects and updates relevant features during
training. It builds the model by iteratively selecting subsets of
features, employing shared decision trees, and gradually learning
feature importance, leading to an interpretable and efficient model
for accurate avocado classification..
```
📚**LIBRARIES NEEDED**

- Pandas
- Tensorflow
- Seaborn
- Sklearn
- pathlib
- numpy
- keras
- torch

📈**Performance of the Models based on the Accuracy Scores**

| Model | Accuracy |
| ----------------- | ------------------------------------------------------------------ |
| TabNet | 0.79 |
| LSTM |9389041095890411 |
| FNN| 1.0 |

**TabNet Comparison Evaluation**
<br>
![Tabnet comparison evaluation](https://github.com/abhisheks008/DL-Simplified/blob/1630e48a26b392ea03f882270222dab253e8470e/Avocados%20Classification/Images/TabNet%20Comparison%20evaluation.png)
<br>
<br>
**LSTM Comparison Evaluation**
<br>
![Lstm comaprison evaluation](https://github.com/abhisheks008/DL-Simplified/blob/1630e48a26b392ea03f882270222dab253e8470e/Avocados%20Classification/Images/LSTM%20comparison%20evaluation.png)
<br>
<br>
**FNN Comparison Evaluation**
<br>
![FNN Comaprison Evaluation](https://github.com/abhisheks008/DL-Simplified/blob/1630e48a26b392ea03f882270222dab253e8470e/Avocados%20Classification/Images/FNN%20Comparison%20evaluation.png)

<br>

![Comparison graph](https://github.com/RAJharsh02/Avocados-classification/assets/118257196/60225a7c-e5eb-4904-8ec4-db7f079e2d60)

📢**CONCLUSION**

In conclusion, this project aimed to classify Avocados using DL models. Among the models developed, the Feedforward Neural Network (fNN) achieved the highest accuracy of 100%. This suggests that the temporal dependencies captured by the FNN architecture are valuable in slassifying Avocados.

✒️**AUTHOR**

- Code contributed by *Harsh Raj* @ #SSoC_2023 <br>
Email : harshraj2828@gmail.com <br>
[![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/RAJharsh02)

- README.md modified by *Mariam* @ #DWoC_2023

[![LinkedIn](https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/mariam-m7084) [![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)](https://github.com/mariam7084/)