Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kruthiktr/crop-recommendation-system-using-machine-learning
A machine learning-based system recommending crops based on soil, climate, and environmental conditions to optimize agricultural yields.
https://github.com/kruthiktr/crop-recommendation-system-using-machine-learning
ai-in-agriculture crop-recommendation data-visualization machine-learning prediction python python3 recommendation-system
Last synced: 21 days ago
JSON representation
A machine learning-based system recommending crops based on soil, climate, and environmental conditions to optimize agricultural yields.
- Host: GitHub
- URL: https://github.com/kruthiktr/crop-recommendation-system-using-machine-learning
- Owner: KRUTHIKTR
- License: mit
- Created: 2024-09-17T16:55:14.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-17T17:22:02.000Z (about 2 months ago)
- Last Synced: 2024-10-01T19:28:38.611Z (about 1 month ago)
- Topics: ai-in-agriculture, crop-recommendation, data-visualization, machine-learning, prediction, python, python3, recommendation-system
- Language: Jupyter Notebook
- Homepage:
- Size: 1.33 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Crop Recommendation System Using Machine Learning
The Crop Recommendation System is a machine learning-based application that provides crop recommendations based on various environmental and soil conditions. The primary goal is to assist farmers and agricultural professionals in making informed decisions, optimizing crop yields, and maximizing profitability.By considering factors such as soil type, climate, rainfall, temperature, humidity, and pH levels, the system predicts the most suitable crops for specific regions. It leverages historical data and advanced predictive models to offer personalized recommendations tailored to the specific conditions of a farm or agricultural area.
## Dataset
The dataset used in this project is built by augmenting rainfall, climate, and fertilizer data specific to India. The following attributes are included in the dataset:- **N:** Nitrogen content in the soil
- **P:** Phosphorous content in the soil
- **K:** Potassium content in the soil
- **Temperature:** Temperature in degrees Celsius
- **Humidity:** Relative humidity in %
- **pH:** pH value of the soil
- **Rainfall:** Rainfall in mm
## Key Features
- **Input Data Collection:** Allows users to input data such as soil parameters, climate information, and geographic location.- **Data Preprocessing:** Handles missing values, normalizes/scales features, and transforms categorical variables to prepare the data for analysis.
- **Machine Learning Models:** Employs multiple machine learning algorithms, including Decision Trees, Random Forests, Support Vector Machines (SVM), and Gradient Boosting techniques, to build accurate predictive models.
- **Model Training and Evaluation:** Models are trained on historical data and evaluated using performance metrics to ensure reliability and precision.
- **Crop Recommendation:** Based on the trained models, the system recommends the most suitable crops for the given environmental and soil parameters.
## Technologies Used
- **Python:** Programming language used for model development, data preprocessing, and building the application.- **Scikit-learn:** Machine learning library used for training, evaluation, and making predictions.
- **Pandas:** Data manipulation library used for preprocessing and analyzing the data.
- **NumPy:** Numerical computing library used for handling arrays and performing mathematical operations.
## Experiment Results
- **Data Analysis:**
- Most columns contain outliers, except for Nitrogen (N).
- **Performance Evaluation:**
- The dataset was split into 80% training data and 20% validation data.
- **Training and Validation:**
- Gaussian Naive Bayes (GaussianNB) outperformed other classification models.
- GaussianNB ( 93.26 % accuracy score )
- **Performance Results**
- Training Accuracy: **93.26%**
- Validation Accuracy: **92.53%**
## Conclusion
This project provides an effective crop recommendation system using machine learning. The Gaussian Naive Bayes model showed a strong performance, achieving high accuracy on both training and validation sets.