CropCast is a machine learning-powered tool designed to predict agricultural yield based on various environmental and agricultural factors. It utilizes multiple regression models to analyze the impact of rainfall, pesticides, temperature, and crop type on yield prediction.
- Data Preprocessing: Cleans and processes agricultural datasets.
- Multiple Machine Learning Models: Implements:
- Linear Regression
- Lasso Regression
- Ridge Regression
- Decision Tree Regressor
- K-Nearest Neighbors (KNN)
- Model Evaluation: Uses Mean Absolute Error (MAE) and R² score to compare performance.
- Yield Prediction Function: Predicts yield based on Year, Rainfall, Pesticides, Temperature, Area, and Crop Type.
The project utilizes the following CSV files:
yield_df.csv: Contains agricultural yield data.rainfall.csv: Historical rainfall data.temp.csv: Temperature data.pesticides.csv: Pesticide usage statistics.
Ensure you have Python and the following libraries installed:
pip install pandas numpy seaborn matplotlib scikit-learngit clone https://github.com/utkarshranaa/CropCast.git
cd CropCast- Open the
CropCast.ipynbnotebook. - Execute all cells to preprocess data, train models, and generate predictions.
Each model is evaluated based on:
- Mean Absolute Error (MAE)
- R² Score
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to submit issues or pull requests to improve the project.
Developed by Utkarsh Rana.