Foodgravity: understand food flows using classic gravity model and explainable artificial intelligence techniques - Dusabe, B. (University of Twente, 2024)
Mapping food flows from production areas to consumption areas is essential and often challenging, especially at local scales (Moschitz & Frick, 2021). Knowing how food moves over space and time is crucial for policy-making to maintain food and nutrition security across scales. Nevertheless, there is a tendency to prioritize flows between countries at the global level i.e., Food and Agriculture Organization trade data (FAO, 2023a) whereas the internal food flows within a country are often neglected. This oversight can lead to less efficient spatial planning and agricultural interventions, particularly in less-developed areas where food and nutrition security remains a critical challenge. However, the food flow is a complex issue resulted from socio-ecological characteristics of both origin and destination areas, as well as the linkages in between. To untangle this complexity, this research combined concepts of classic gravity model with machine learning techniques, relying on Explainable Artificial Intelligence techniques (xAI) to enhance the transparency of the predictive models. The Irish potato was chosen as the focus crop to study its flow distribution among 30 districts of Rwanda. Objectives included compiling a comprehensive database of socio-economic and environmental factors along with district pair food flows, and leveraging machine learning methods to predict whether a particular district pair presents Irish potato food flows or not. Specifically, Random Forest (RF) and Support Vector Machine (SVM) were trained to predict Irish potato food flows, while the Local Interpretable Model-agnostic Explanations (LIME) xAI technique was used to further investigate particular district pair instance prediction and its most influencing features. Both RF and SVM models demonstrated high overall accuracy (both above 90%) in predicting district level Irish potato flow. However, it is important to note that the dataset presented imbalanced classes where district pairs that contained Irish potato flows were about 7% of the total data samples, while the remaining dataset comprised the absence of Irish potato flow. F1 score, which is the harmonic mean of precision and recall, was used to evaluate the class prediction accuracy of the models. On the both RF and SVM models, F1 score of class 0 (absence of flow) was 0.96 whereas on class 1 (Presence of flow) was 0.61 for RF and 059 for SVM. These F1 scores shows that both models were accurate at predicting the absence of Irish potato flows (class 0) than the presence of flow (class1), reflecting an imbalance in the dataset where instances of Irish potato flows were less frequent. Using Local Interpretable Model-agnostic Explanations (LIME) xAI technique it was observed that environmental factors notably at the origin district were the most flow influencers compared to socio-economic features. The study recommends the integration of market level flow data, the scope and temporal expansion for a more granular analysis.