Predicting aflatoxin risk in maize using machine learning and satellite data in East and Southern Africa

Abstract Mycotoxin contamination in staple cereals like maize poses significant health risks to humans and livestock worldwide. The fungus Aspergillus flavus , the primary aflatoxin producer, is influenced by climate, soil type, nutrients, and crop management practices. This study mapped aflatoxin risk in maize and its drivers using ensemble (gradient boosting, adaptive boosting, random forest) and non-ensemble (support vector machine, neural networks, naïve bayes, K-nearest neighbours) machine learning methods. We analysed 907 pre-harvest samples from Kenya, Uganda, Malawi, and Tanzania collected between 2009 and 2022. Aflatoxin levels were categorized into low (<5 ppb), medium (>5–20 ppb), and high (>20 ppb) risk classes. Models were trained on biophysical variables – temperature, moisture, topography, and soil – using space-time cross-validation (80:20 training-to-testing split). The trained random forest ranger model showed consistent performance with a balanced accuracy of 51%, overall accuracy of 48%, and F1-scores of 32%. In the test set, gradient boosting achieved the highest balanced accuracy of 62% and class-based F1-scores of 67% (low), 45% (medium), and 41% (high). External validation on 2020 data exhibited model generalizability, with an F1-score of 71% for the low-risk class, while the medium- and high-risk classes had lower F1-scores (5% and 14%, respectively) due to small sample sizes. The gradient boosting model that performed best on unseen data was used for variable importance and spatial predictions. Key risk factors were precipitation (higher risk <200 mm), elevation (higher risk <1000 m asl), and soil temperature (18–24 °C for low-moderate risk; 24–27 °C for higher risk). Spatial predictions indicated major risks along the coast, with projections suggesting rising temperatures could expand high-risk areas inland. Despite model limitations, findings can guide better sampling strategies and early action. Future research should incorporate crop management practices and finer-resolution environmental and socio-economic data to improve model reliability.

Authors

Institutions

Publication Details

Journal
World Mycotoxin Journal
Published
2025-04-08
DOI
https://doi.org/10.1163/18750796-bja10018
Citations
2
Primary Topic
Spectroscopy and Chemometric Analyses
Type
article
Field-Weighted Citation Impact
1.50

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Predicting aflatoxin risk in maize using machine learning and satellite data in East and Southern Africa

Francis Muthoni, Stella Gachoki, Nancy Karimi Njeru, George Mahuku et al.
2 citations
World Mycotoxin Journal
Spectroscopy and Chemometric Analyses
1.50
article

Predicting aflatoxin risk in maize using machine learning and satellite data in East and Southern Africa

Francis Muthoni, Stella Gachoki, Nancy Karimi Njeru, George Mahuku, Leena Tripathi, J. M. Z. Kamau, Joseph Atehnkeng
article en
2 citations

Abstract

Abstract Mycotoxin contamination in staple cereals like maize poses significant health risks to humans and livestock worldwide. The fungus Aspergillus flavus , the primary aflatoxin producer, is influenced by climate, soil type, nutrients, and crop management practices. This study mapped aflatoxin risk in maize and its drivers using ensemble (gradient boosting, adaptive boosting, random forest) and non-ensemble (support vector machine, neural networks, naïve bayes, K-nearest neighbours) machine learning methods. We analysed 907 pre-harvest samples from Kenya, Uganda, Malawi, and Tanzania collected between 2009 and 2022. Aflatoxin levels were categorized into low (<5 ppb), medium (>5–20 ppb), and high (>20 ppb) risk classes. Models were trained on biophysical variables – temperature, moisture, topography, and soil – using space-time cross-validation (80:20 training-to-testing split). The trained random forest ranger model showed consistent performance with a balanced accuracy of 51%, overall accuracy of 48%, and F1-scores of 32%. In the test set, gradient boosting achieved the highest balanced accuracy of 62% and class-based F1-scores of 67% (low), 45% (medium), and 41% (high). External validation on 2020 data exhibited model generalizability, with an F1-score of 71% for the low-risk class, while the medium- and high-risk classes had lower F1-scores (5% and 14%, respectively) due to small sample sizes. The gradient boosting model that performed best on unseen data was used for variable importance and spatial predictions. Key risk factors were precipitation (higher risk <200 mm), elevation (higher risk <1000 m asl), and soil temperature (18–24 °C for low-moderate risk; 24–27 °C for higher risk). Spatial predictions indicated major risks along the coast, with projections suggesting rising temperatures could expand high-risk areas inland. Despite model limitations, findings can guide better sampling strategies and early action. Future research should incorporate crop management practices and finer-resolution environmental and socio-economic data to improve model reliability.

World Mycotoxin JournalVol. 18(2-3)
International Institute of Tropical Agriculture (UG), Kenya Agricultural and Livestock Research Organization (KE), International Institute of Tropical Agriculture (KE)
Consortium of International Agricultural Research Centers
Openalex Percentile: Top 21%
Spectroscopy and Chemometric Analyses
1.50
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.