This project aims to develop a machine learning model capable of predicting agricultural product prices using advanced data analysis and machine learning techniques.
- Build an accurate predictive model for agricultural product prices
- Compare different machine learning techniques
- Provide a decision-support tool for farmers and traders
- Python 3.8+
- Jupyter Notebook or compatible IDE
- numpy
- pandas
- matplotlib
- scikit-learn
- joblib
- seaborn
- openpyxl
- Clone the repository
git clone https://github.com/Grand-Nord-Developpers-Community/live-coding-session-MachineLearning.git
cd agricultural-price-prediction
- Install dependencies
pip install -r requirements.txt
ecocrops_dataset.xlsx
: Agricultural prices datasetPrediction Prix Produits agricole.ipynb
: Main Jupyter Notebookbest_price_prediction_model.joblib
: Exported model
- Data exploration
- Preprocessing and encoding
- Training and test data separation
- Multiple model training
- Comparative evaluation
- Linear Regression
- Decision Tree
- Random Forest
- Gradient Boosting
Model | MSE | R² | Performance |
---|---|---|---|
Linear Regression | 481,529.90 | 0.96% | Low |
Decision Tree | 119,260.23 | 75.5% | Medium |
Random Forest | 94,404.43 | 80.6% | Very Good |
Gradient Boosting | 89,783.21 | 81.5% | Excellent |
# Prediction example
predicted_price = predict_price(
zone='MORA',
product='Rice',
month='April',
year=2024
)
- Agricultural price prediction
- Price distribution analysis
- Trend visualization
- Best model export
- Current accuracy: ±3-8% of average prices
- Improvement areas:
- Larger data collection
- Integration of additional variables
- Exploration of more advanced models
Contributions are welcome! Please follow these steps:
- Fork the project
- Create a feature branch
- Commit your changes
- Submit a pull request
MIT
- Development team
- Contributors
- Data sources