Machine learning / Geospatial
Testing soil carbon models across borders
How does a soil-carbon model perform in countries it never saw during training?
Solution
I tested ridge regression and boosting on the same European soils under two training scenarios, then checked interval coverage by country.
My contribution · I built the matched test design, fit the models and measured interval coverage by country.
Tools Python · scikit-learn
Results
On 1,752 test soils, boosting MAE rose from 21.23 to 22.91 g/kg when target countries were excluded from training.
Prediction intervals covered 81.9% of Swedish test soils, below the 90% nominal target.
- Boosting MAE in unseen countries
- 22.91 g/kg Source
Data & evaluation
Data sources
- OSSL LUCAS soil records in a matched geographic design
Method
- Fit regularized and boosted models and check errors and interval coverage by country.
Limitations
The result is specific to this cohort, sampling design and target definition.
Testing transfer to other regions requires independent samples and a new check of interval coverage for each target region.
Reproduce the study
Install the Python requirements, prepare the documented OSSL LUCAS cohort, then run the geographic holdout and coverage evaluation.
Local reproduction instructions and pinned sourceSkills demonstrated
- Geographic holdout design
- Model benchmarking
- Prediction interval evaluation
Project figures

The tested samples are identical in both scenarios, so the 21.23 to 22.91 g/kg contrast reflects a change in training geography.
Idriss Lemnouni. LUCAS soil data via Open Soil Spectral Library.Figure source
Intervals covered 81.9% of Swedish test soils under country holdout, below the 90% nominal target.
Idriss Lemnouni. LUCAS soil data via Open Soil Spectral Library.Figure source