Key points are not available for this paper at this time.
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 (P 2 O 5 ), and potassium (K 2 O) using a national-scale dataset of 7,180 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%, R 2 ≈ 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%, R 2 ≈ 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.
Ennaji et al. (Sun,) studied this question.