This project aims to support precision farming by recommending the most suitable crop based on soil and environmental parameters. It also analyzes the ideal growing conditions for various crop varieties, offering data-driven insights for improved agricultural decision-making.
- ๐ Predict the most appropriate crop based on given environmental and soil data.
- ๐ Analyze optimal growing conditions such as temperature, humidity, rainfall, and soil nutrients (N, P, K).
- โ๏ธ Compare two machine learning approaches to determine the most reliable and accurate solution.
Two modeling approaches were explored:
Trained a classification model using:
- Rainfall
- Temperature
- Humidity
- Nitrogen (N), Phosphorus (P), Potassium (K)
โ Achieved 96.8% accuracy using scikit-learn with proper model tuning.
Built a model to predict the ideal environmental conditions required for a given crop.
While informative, this approach was less accurate than the crop classification model.
๐ Conclusion: The classification model performed significantly better for the task of crop prediction.
- Python
- scikit-learn, pandas, NumPy
- matplotlib, seaborn
- Jupyter Notebook
- Predicts the best crop based on input environmental factors.
- Visualizes how conditions affect crop suitability.
- Compares and explains model performance.
- ๐ฆ๏ธ Integrate with real-time weather and soil APIs.
- ๐ Extend to include crop yield prediction.
- ๐ฅ๏ธ Build a lightweight web interface for easier access.