Efficient water management is a cornerstone of modern precision farming, enabling farmers to optimize resource utilization and enhance crop yields. Traditional methods of soil moisture assessment rely on widespread sensor deployment, which can be costly and logistically challenging for large fields.
This project leverages machine learning to predict soil moisture in unsensed areas using data from limited sensors, offering an affordable and scalable solution for precision irrigation.
- Predict soil moisture in unsensed areas using limited sensor data.
- Improve irrigation planning with accurate, real-time estimates.
- Center:
(11, 8) - Point 1:
(13.5, 10.5) - Point 2:
(16, 13)
- A single sensor was used to collect data individually at each point for several days.
- Split into manageable subsets.
- Missing values handled using:
- Mean Imputation
- Forward Fill (ffill)
- All datasets were time-aligned and merged into one unified timeline for model training.
Moisture readings from various points over time:
Four models were evaluated using cross-validation:
| Model | Mean MSE ± SD | Mean R² ± SD |
|---|---|---|
| Linear Regression | 0.0581 ± 0.0482 | 0.6415 ± 0.1802 |
| Decision Tree | 0.0196 ± 0.0373 | 0.9110 ± 0.1305 |
| Random Forest | 0.0218 ± 0.0399 | 0.9093 ± 0.1405 |
| XGBoost | 0.0378 ± 0.0453 | 0.8512 ± 0.1541 |
📌 Conclusion:
Decision Tree and Random Forest outperformed others, with Random Forest being selected due to its ensemble learning strength and generalization capability.
To further enhance prediction accuracy, we implemented a Voting Regressor combining:
- Decision Tree
- Random Forest
- XGBoost
✅ This ensemble yielded highly consistent results and strong alignment between actual vs. predicted moisture levels.
Estimate soil moisture at unsensed locations using:
- Time
- Distance from sensor
- Initial center moisture
- MSE: 0.00033
- R²: 0.9975
✅ Accurate and dynamic prediction at customizable distances for smarter irrigation.
- Initial center moisture: 1.647113
- Decrease rate: 0.05 per minute
- Predictions made at 3.5 and 6.0 units away
The simulation confirms that the model captures realistic soil moisture dynamics, making it a valuable tool for field-level irrigation planning.
- Machine learning reduces reliance on dense sensor grids.
- Random Forest and Voting Regressor achieved R² > 0.99.
- Simulation confirmed model's ability to capture dynamic moisture behavior.
- Predictions strongly align with real-world trends.
- Feature Expansion: Add temperature, humidity, and soil type.
- Automation: Use drones/robots for optimized sensor deployment.
- Dashboards: Build real-time farmer-friendly monitoring interfaces.
- Scalability: Deploy in industrial-scale farms with diverse environments.
This project proves that machine learning can effectively predict soil moisture in unsensed locations with high accuracy, even from sparse data. It lays a strong foundation for:
- Smart irrigation systems
- Scalable sensor-limited deployment
- Sustainable farming practices
We plan to expand the model’s capabilities and deploy it in real-world agricultural settings to drive data-driven farming forward.
├── project_documents/
│ ├── project_presentation
│ ├── project_documentation
│ └── project_code
├── 📁 images/
│ ├── actual_vs_predicted_location_2.png
│ ├── actual_vs_predicted_location_3.png
│ ├── banner.png
│ ├── model_2_prediction.png
│ ├── moisture_data_plot.png
│ ├── predicted_moistures_over_the_time.png
│ ├── voting_regressor_prediction.png
│ └── voting_regressor_predictions.png
└── README.md






