Machine learning–based optimization of site-specific NPK fertilizer recommendation

Efficient fertilizer use is important for sustainable intensification, yet uniform recommendations tend to ignore sharp spatial and seasonal variability in soils, climate, and crop response. This study develops a machine learning–based and constrained optimization framework to generate site-specific recommendations for nitrogen (N), phosphorus (P2O5), and potassium (K2O) using a national-scale dataset of 7180 Moroccan cereal data-points spanning three seasons and eight regions. A diverse suite of 47 model variants was compared under random and temporal sampling regimes to evaluate interpolation versus forecast performance. The best-performing model achieved high yield-prediction accuracy under the random split (sMAPE ≈ 4.5%, R2 ≈ 0.96), with yield variation primarily explained by geospatial, seasonal, and nutrient–soil interaction features. In contrast, performance under a temporal split declined (sMAPE ≈ 17.8%, R2 ≈ 0.17), reflecting structural and regional non-stationarity across seasons. Accordingly, all recommendation experiments relied on the globally best surrogate model trained under the random regime, while temporal outcomes were used for diagnostic purposes. Embedding the best-performing predictors within penalty-weighted objective functions and diverse optimization algorithms (deterministic, stochastic, metaheuristic, learning-based, and hybrid) produced model-simulated NPK decision-support recommendations. These recommendations increased simulated yields by up to 683 kg/ha ( ≈ 20% over a 3.4 t/ha baseline) while improving nutrient-use efficiency under explicit environmental constraints. The framework establishes a constrained learning-to-optimize decision-support paradigm that converts agronomic observations into model-simulated fertilizer recommendations intended to prioritize rapid field testing.

Authors

Publication Details

Journal
Smart Agricultural Technology
Published
2026-01-25
DOI
https://doi.org/10.1016/j.atech.2026.101823
Primary Topic
Soil Geostatistics and Mapping
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Machine learning–based optimization of site-specific NPK fertilizer recommendation

Achraf El Allali, Oumnia Ennaji, Abdelghani Belgaid
Smart Agricultural Technology
Soil Geostatistics and Mapping
article

Machine learning–based optimization of site-specific NPK fertilizer recommendation

Achraf El Allali, Oumnia Ennaji, Abdelghani Belgaid
article en

Abstract

Efficient fertilizer use is important for sustainable intensification, yet uniform recommendations tend to ignore sharp spatial and seasonal variability in soils, climate, and crop response. This study develops a machine learning–based and constrained optimization framework to generate site-specific recommendations for nitrogen (N), phosphorus (P2O5), and potassium (K2O) using a national-scale dataset of 7180 Moroccan cereal data-points spanning three seasons and eight regions. A diverse suite of 47 model variants was compared under random and temporal sampling regimes to evaluate interpolation versus forecast performance. The best-performing model achieved high yield-prediction accuracy under the random split (sMAPE ≈ 4.5%, R2 ≈ 0.96), with yield variation primarily explained by geospatial, seasonal, and nutrient–soil interaction features. In contrast, performance under a temporal split declined (sMAPE ≈ 17.8%, R2 ≈ 0.17), reflecting structural and regional non-stationarity across seasons. Accordingly, all recommendation experiments relied on the globally best surrogate model trained under the random regime, while temporal outcomes were used for diagnostic purposes. Embedding the best-performing predictors within penalty-weighted objective functions and diverse optimization algorithms (deterministic, stochastic, metaheuristic, learning-based, and hybrid) produced model-simulated NPK decision-support recommendations. These recommendations increased simulated yields by up to 683 kg/ha ( ≈ 20% over a 3.4 t/ha baseline) while improving nutrient-use efficiency under explicit environmental constraints. The framework establishes a constrained learning-to-optimize decision-support paradigm that converts agronomic observations into model-simulated fertilizer recommendations intended to prioritize rapid field testing.

Smart Agricultural TechnologyVol. 13
Openalex Percentile: Top 80%
Soil Geostatistics and Mapping
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.