Skip to content

TanishqThuse/Crop_Yield_Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

🌾 Crop Yield Prediction 🌱

🚀 Overview

The Crop Yield Prediction project aims to classify soil fertility based on various soil properties using machine learning models 🤖. It categorizes soil into three classes:

  • 🟢 0 - Less Fertile
  • 🟡 1 - Fertile
  • 🔴 2 - Highly Fertile

We use key soil nutrients and properties like Nitrogen (N), Phosphorous (P), Potassium (K), pH level, Electrical Conductivity (ec), Organic Carbon (oc), and other micronutrients to predict soil fertility.

👨‍💻 Team Members

  • 🎯 Tanishq Thuse
  • 🔥 Kavish Paraswar
  • ⚡ Swaraj Patil
  • 🚀 Neel Sahastrabudhe

📊 Dataset

We used the Soil Fertility Dataset available on Kaggle 📂:
🔗 Dataset Link

📌 Dataset Details:
1288 samples
12 input features
1 target variable (Fertility Classification: 0, 1, 2)


📂 Project Structure

🔍 1. Data Exploration - Understanding feature distributions and correlations
🛠 2. Data Preprocessing - Splitting data into training and validation sets
🧠 3. Model Training - Implementing ML models:

  • 🌳 Random Forest Classifier
  • 🦠 Gaussian Naive Bayes
  • ⚡ Support Vector Machine (SVM)
  • 📍 K-Nearest Neighbors (KNN)
    📊 4. Model Evaluation - Analyzing accuracy & classification reports
    🔧 5. Data Modification - Improving model performance

🔑 Features Used

Feature Description
N Nitrogen (NH4+) ratio
P Phosphorous ratio
K Potassium ratio
pH Soil acidity level
ec Electrical Conductivity
oc Organic Carbon
S Sulfur content
Zn, Fe, Cu, Mn, B Micronutrient levels
Output Fertility Class (0, 1, 2)

📦 Libraries Used

📊 Pandas - Data manipulation
NumPy - Numerical computations
📉 Matplotlib & Seaborn - Data visualization
🤖 Scikit-learn - Machine Learning models


🚀 How to Run the Project

1️⃣ Clone the Repository

git clone https://github.com/your-repo/crop-yield-prediction.git
cd crop-yield-prediction

2️⃣ Install Dependencies

pip install -r requirements.txt

3️⃣ Run the Jupyter Notebook

jupyter notebook GFG_Project.ipynb

4️⃣ Follow the Notebook Sections

📌 Sections:
✅ Data Exploration
✅ Data Preprocessing
✅ Model Training
✅ Model Evaluation


🏆 Results

🎯 Random Forest Classifier achieved 94.95% accuracy! 🎯
🔹 Model performance can be improved further by:

  • Hyperparameter tuning 🛠
  • Feature engineering 🧪

🔮 Future Work

📌 Feature Engineering - Add more soil properties for better predictions
📌 Hyperparameter Tuning - Use Grid Search / Random Search
📌 Deployment - Convert the model into a web app or API 🌐


🏁 Conclusion

The Crop Yield Prediction project successfully uses Machine Learning in agriculture to optimize soil management and maximize crop yields 🌾.

🔬 Future improvements can make it more accurate & scalable for real-world applications! 🚀


📜 License

This project is licensed under the MIT License 📜. See the LICENSE file for details.


Team Rocket 🚀
📅 Date: 31/01/2025

About

The Crop Yield Prediction project predicts soil fertility using machine learning based on soil properties and elemental analysis. It classifies soil into three categories: Less Fertile (0), Fertile (1), and Highly Fertile (2). The Random Forest Classifier achieved the best accuracy of 94.95%.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors