Soil Water Content Prediction (NIR + SVR)
SVM regression model achieving R² = 0.94 for predicting soil water content from NIR spectral reflectance.

Gallery


Problem
Rapid, non-destructive soil moisture measurement is critical for irrigation scheduling and soil health assessment. Laboratory gravimetric methods are slow and destructive.
Approach
Developed an SVM regression model with RBF kernel to predict soil water content (0-40%) from NIR spectral reflectance (189-2514 nm, ~2,557 wavelengths). Used StandardScaler preprocessing and stratified train/validation/test split (70/15/15). Hyperparameters: C=100, gamma='scale', epsilon=0.1.
Data
72 NIR spectrometer measurements (NQ5500316, Uni Bonn) across 9 water content levels (0-40%), 8 replicates per level. Full spectral range: UV, Visible, NIR.
Validation
5-fold cross-validation on training set (mean R² = 0.89). Final test set evaluation with R², RMSE, MAE, and accuracy at multiple tolerance levels.
Results
Test R² = 0.94, MAE = 2.38%, RMSE = 2.98%. 91% of predictions within ±5% of actual water content. Minimal overfitting (train-test R² difference = 0.03).
My Role
Sole developer. Built complete pipeline from data extraction to trained model. Wrote comprehensive project report.
Next Steps
Expand dataset with multiple soil types; test derivative spectroscopy; compare with ensemble methods; field validation with portable spectrometer.
Key Outcomes
- R² = 0.94 on held-out test set
- 91% accuracy within ±5% tolerance
- Deployable sklearn model (.pkl)
- Complete reproducible pipeline