Skip to content

prisha2410/crop__recommendation

Repository files navigation

🌾 Crop Recommendation System

A machine learning project that recommends the best crop to grow based on soil and environmental conditions.

Python ML

📋 About

This project uses machine learning to help farmers choose the right crop based on:

  • Soil nutrients (NPK values)
  • Temperature & Humidity
  • pH level
  • Rainfall

Dataset: 2,200 samples covering 22 different crops

🎯 Results

Model Accuracy
Gaussian Naive Bayes 99.55% 🥇
Support Vector Machine 99.55% 🥇
Random Forest 99.32%
XGBoost 99.09%

🚀 Quick Start

Install Dependencies

pip install -r requirements.txt

Run the Notebook

jupyter notebook crop_recommendation.ipynb

📊 Features Used

  • N: Nitrogen content
  • P: Phosphorus content
  • K: Potassium content
  • Temperature: °C
  • Humidity: %
  • pH: Soil pH level
  • Rainfall: mm

🌱 Crops Supported (22 types)

Rice, Wheat, Maize, Cotton, Jute, Coffee, Apple, Banana, Mango, Grapes, Watermelon, Orange, Papaya, Coconut, Chickpea, Lentil, Blackgram, Mungbean, Mothbeans, Pigeonpeas, Kidneybeans, Pomegranate

🛠️ Technologies

  • Python 3.8+
  • scikit-learn
  • pandas, numpy
  • matplotlib, seaborn
  • XGBoost, LightGBM, CatBoost

📁 Files

  • crop_recommendation.ipynb - Main notebook with all models
  • EM(1).ipynb - Ensemble methods experiments
  • Crop_recommendation.csv - Dataset

⭐ Star this repo if you find it helpful!


Machine Learning for Agriculture - Making farming smarter 🌾

About

Config files for my GitHub profile.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors