Machine learning classification–Regression schemes for desert locust presence prediction in western Africa
Abstract
Producción Científica
Full text
Citation: Cornejo-Bueno, L.; Pérez-Aracil, J.; Casanova-Mateo, C.; Sanz-Justo, J.; Salcedo-Sanz, S. Machine Learning Classification– Regression Schemes for Desert Locust Presence Prediction in Western Africa. Appl. Sci. 2023,13, 8266. https:// doi.org/10.3390/app13148266 Academic Editor: Zhengjun Qiu Received: 16 May 2023 Revised: 21 June 2023 Accepted: 5 July 2023 Published: 17 July 2023 Copyright: © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). applied sciences Article Machine Learning Classification–Regression Schemes for Desert Locust Presence Prediction in Western Africa L. Cornejo-Bueno 1,* , J. Pérez-Aracil 1, C. Casanova-Mateo 2, J. Sanz-Justo 3and S. Salcedo-Sanz 1 1Department of Signal Processing and Communications, Universidad de Alcalá, 28805 Alcalá de Henares, Spain; jorge.per[email protected] (J.P.-A.); [email protected] (S.S.-S.) 2Department of Information Systems, Universidad Politécnica de Madrid, 28031 Madrid, Spain; [email protected] 3Laboratorio de Teledetección (LATUV), Remote Sensing Laboratory, Universidad de Valladolid, 47002 Valladolid, Spain; [email protected] *Correspondence: [email protected] Abstract: For decades, humans have been confronted with numerous pest species, with the desert locust being one of the most damaging and having the greatest socio-economic impact. Trying to predict the occurrence of such pests is often complicated by the small number of records and observations in databases. This paper proposes a methodology based on a combination of classification and regression techniques to address not only the problem of locust sightings prediction, but also the number of locust individuals that may be expected. For this purpose, we apply different machine learning (ML) and related techniques, such as linear regression, Support Vector Machines, decision trees, random forests and neural networks. The considered ML algorithms are evaluated in three different scenarios in Western Africa, mainly Mauritania, and for the elaboration of the forecasting process, a number of meteorological variables obtained from the ERA5 reanalysis data are used as input variables for the classification–regression machines. The results obtained show good performance in terms of classification (appearance or not of desert locust), and acceptable regression results in terms of predicting the number of locusts, a harder problem due to the small number of samples available. We observed that the RF algorithm exhibited exceptional performance in the classification task (presence/absence) and achieved noteworthy results in regression (number of sightings), being the most effective machine learning algorithm among those used. It achieved classification results, in terms of F-score, around the value of 0.9 for the proposed Scenario 1. Keywords: desert locusts; classification; regression; machine learning methods 1. Introduction The desert locust (Schistocerca gregaria sp.) is considered one of the most dangerous migratory pest species in the world [ 1 , 2 ], due to its fast reproduction time, capability of adaptation to and survival in difficult conditions [ 3 ], ability to migrate long distances and its harmful impact on crops [ 4 ]. Specifically, plagues of desert locusts have swept the Western Africa region for centuries [ 5 ], with high impacts in terms of crops losses and food scarcity, on the environment (due to pesticides and treatments against these insects [ 6 ]) and finally on the economy of the affected countries [ 7 ]. Countries such as Mauritania, Burkina Faso, Mali or Niger have suffered devastating desert locust plagues in recent decades, such as those between winter 2003 and spring 2004 in this zone [1]. The Food and Agriculture Organization of the United Nations (FAO) [ 8 ] has pointed out the necessity of implementing preventive strategies in the main affected countries. Western and Eastern Africa [ 5 , 9 ], Southwest Asia [ 10 ] and the area around the Red Sea are the zones with favourable climatic conditions to witness an upsurge of desert locust plagues [ 1 ]. These preventive strategies include the detection of breeding ground areas, the tracking of locust intrusion with Internet of Things devices [ 11 ] and the treatment Appl. Sci. 2023,13, 8266. https://doi.org/10.3390/app13148266 https://www.mdpi.com/journal/applsci
Appl. Sci. 2023,13, 8266 2 of 16 with pesticides whenever possible, in order to reduce the probability of plagues in a given region [ 12 ]. There are many previous studies on the detection of desert locust breeding ground areas, using different data (satellite [ 5 , 13 , 14 ] and ground measurements [ 15 ]) and including modern computational techniques [16]. In recent years, the use of machine learning (ML) algorithms has been very important in Earth observation problems [ 17 – 19 ]. In ref. [ 20 ], a random forest algorithm is applied to the problem of locating desert locust juvenile individuals in Mauritania using soil moisture data. In ref. [ 21 ], a rule generation algorithm by means of genetic algorithms is proposed for the problem of predicting desert locust presence (breeding area locations). In ref. [ 22 ], a Hidden Markov Model is applied to predict the severity of locust plagues in croplands using remote sensing data. In ref. [ 23 ], different ML classifiers such as the gradient boosting, RF and Maximum Entropy methods are compared in a problem of desert locust detection in different countries of Western Africa, such as Niger, Mauritania, Mali, Algeria and Morocco. The results obtained have shown good results when the database are completed with “pseudo-absenses” data. In ref. [ 24 ], different ML classification algorithms have been applied to the problem of desert locus breeding area prediction across Africa and Asia. Specifically, eXtreme gradient boosting, Weighted k-Nearest Neighbors, Feed-Forward Neural Networks, Support Vector Machines and RF algorithms have been applied and discussed in different breeding area locations, including pseudo-absence data. In ref. [ 25 ], the problem of desert locust presence prediction using an ML classification approach (Support Vector Machines with sliding windows) and remote sensing data is tackled. The region of with pseudo-absences is considered. In ref. [ 26 ], a deep learning approach including convolutional neural networks and LSTM networks is presented for the problem of desert locust detection (classification task) in East Africa. In ref. [ 27 ], a convolutional neural network has been applied for the detection of two species, African migratory locust (Locusta migratoria migratoriodes) and Red locust (Nomadacris septemfasciata), that are prevalent in the study area in Zambia. Images taken in situ are used to train and validate the results of locust detection in that work. All these previous approaches dealing with ML algorithms for desert locust prediction and related problems share some common features. First, all of them are focused on different regions of Africa, and some of them include data from Asia and the Middle East, using data from the FAO desert locust database [ 8 ] as the main target source of data. Second, all these previous approaches have formulated the prediction problems as classification tasks, in many cases as binary classification problems (appearance or non-appearance of locusts or locust breeding areas, etc.). In all the problems reviewed, the small number of registers in the database and the scarce observations present important problems, which have been attempted to be solved by including “pseudo-absences” [ 23 ], an attempt to extend the available databases with synthetic data, such as in [ 20 , 23 ]. However, this method may introduce biases into the prediction models, as pointed out by some authors [ 28 ]. Finally, all the works previously described use similar predictive variables, related to weather variables and soil moisture data. In this paper, an alternative methodology to tackle desert locust prediction problems is proposed. For this purpose, classification–regression tasks are considered (and not only classification approaches) with ML schemes. The problem is focused on the Western Africa region, and the presence-only data are considered in three large breeding zones, in which different ML algorithms are applied to reanalysis and NDVI data. Firstly, classification approaches are applied in order to predict the presence/non-presence of locusts in each zone, in a monthly time horizon. Secondly, a regression step is addressed, in which the number of monthly visualizations of desert locusts in each zone is predicted. The results obtained show that a successful joint prediction of the occurrence and number of locust visualization events is possible with ML classification–regression schemes. The main contributions of this work can be summarized as follows: • An ML-based classification–regression approach is proposed to deal with the problem of desert locust detection in Western Africa.
Appl. Sci. 2023,13, 8266 3 of 16 • The classification task involves a binary detection problem (yes/no) based on weather variables from reanalysis and NDVI data. • A regression task which deals with the number of locust sightings in each study zone is proposed, using similar predictive variables to those of the classification problem. • Experiments based on real sighting data from Western Africa have shown the potential of the proposed classification–regression approach. The rest of the paper has been structured in the following way: The next section describes the methodology proposed, including the data available, the predictive variables and a summary of the ML algorithms considered. Section 3presents the experiments carried out and the results obtained, with a discussion on different aspects of the application of ML classification–regression algorithms to the problem at hand. Section 4closes the paper with some final remarks on the research carried out. 2. Methodology In this paper, we consider an estimation problem to determine the presence or nonpresence of locusts, as well as their number, in different scenarios. For this purpose, we have used time series of sightings as the target variable of the problem. These time series cover the years 2000 to 2015, and the geographical area of the study is West Africa, with Mauritania being the most interesting due to the large number of sightings. Presence data were obtained by downloading from the Locust Hub Initiative provided by the FAO (https://locust-hub-hqfao.hub.arcgis.com/). From this data source, we were able to download the presence or absence of different types of locusts (hoppers, swarms and adults). Since in the time series of locusts there is no regular temporal or spatial continuity, it was decided to segment the problem as follows: In Figure 1, we can see the presence of locusts in green color. The geographical area under study has been divided into 3 regions, about 300 km in diameter, thus forming the three classification–regression scenarios addressed in the paper. In each of these scenarios, the forecasting process consists of monthly estimation of the presence and number of locusts. The exact number of sightings on the time series used, for each scenario, is as follows: Scenario 1 = 5414 (there are 5414 sightings in 123 days); Scenario 2 = 47,131 (there are 47,131 sightings in 210 days) and Scenario 3 = 8897 (there are 8897 sightings in 103 days). To obtain a good estimation, the forecast variables used were obtained from ERA5, the fifth-generation European Centre for Medium-Range Weather Forecasting (ECMWF) reanalysis constructed from observations and atmospheric models. These reanalysis data cover the period from 1959 to present, and their update frequency is every hour [ 29 ]. As mentioned above, the estimation is monthly and from 2000 to 2015, so the time series will be of length 192 (sixteen years times twelve months), so the reanalysis variables will be averaged to monthly data. In each study region, for Scenarios 1, 2 and 3, we downloaded the reanalysis meteorological variables at 5 geographical points, and for each point we obtained a total of 7 variables, listed below: surface pressure, total column water, total column water vapour, 10 m U wind component, 10 m V wind component, 2 m temperature and skin temperature. This makes a total of 35 exogenous reanalysis variables in each area for the regression–classification process. In addition, in each zone we have an extra variable, the Normalized Difference Vegetation Index (NDVI), because of the high correlation it has with the presence or absence of locusts. The selection of these variables for the process of predicting the presence of the Mauritanian locus is based on their relevance and potential relationship with the behavior and distribution of the locust. For example, • Surface pressure can influence weather patterns and the formation of high- and lowpressure systems that may affect the presence and movement of the locust. • Total column water and total column water vapor are related to the availability of moisture in the atmosphere, which can be an important factor for the development and migration of the locust. • The 10 m U and V wind components are relevant for understanding wind patterns and their influence on the dispersion and movement of the locust.
Appl. Sci. 2023,13, 8266 4 of 16 • The 2 m temperature and skin temperature can affect the activity and behavior of the locust as its metabolism and movements may be related to thermal conditions. • NDVI provides information about vegetation and can be associated with food availability for the locust. Overall, these variables have been selected because they are considered to capture relevant climatic, environmental and ecological aspects related to the behavior and distribution of the Mauritanian locust. The bibliographic references that can relate our study to the use of these climatic variables are [21,26,30]. A summary of the variables used and their units can be found in Table 1. In each considered zone, we carried out data partitioning of the dataset by dedicating 70% to the training set and the remaining 30% to the test set. This partitioning is kept the same, with the same samples, for all the ML models tested, in order to proceed with a fair comparison among methods. Note that all the error metrics results are obtained in the test set. Figure 1. Geographical location map of the locust sightings, showing the different study scenarios.
Appl. Sci. 2023,13, 8266 5 of 16 Table 1. Description of the predictive (input) variables in the database for locust presence estimation, Western Africa. Variable Units Surface pressure hPa Total column water kg/m2 Total column water vapour kg/m2 10 m U wind component m/s 10 m V wind component m/s 2 m temperature K Skin temperature K NDVI - 2.1. ML Algorithms Considered Below is a brief overview of the algorithms employed in the prediction process. It is worth noting that most of these algorithms have been utilized for both classification and regression tasks, which will be further elaborated on in Section 3. 2.1.1. Linear Regression (LR) The linear regression method is a mathematical model utilized to determine the relationship between a target variable, y , and a set of input variables, x= [x1 , x2 , . . . , xm] [ 31 ]. This relationship can be expressed mathematically as a linear combination of input variables, weighted by certain parameters: y(x,β) = β0+β1x1+β2x2+· · · +βmxm+ε =β0+ m ∑ j=1 βjxj+ε(1) where βj,∀;j∈0, 1, . . . , m represent the parameters of the multiple regression model, and ε denotes the error associated with the prediction. Typically, the least squares method is employed to calculate the parameters of the model [32]. However, it is important to acknowledge that this approach has its limitations. Merely observing that two variables exhibit similar growth or decline patterns does not necessarily imply a causal relationship, as a spurious connection might exist between them. To address this, non-linear functions are often employed to achieve a more accurate approximation to reality. The following algorithms aim to accomplish precisely that. 2.1.2. Decision Trees (DT) Decision trees are a popular non-parametric machine learning method utilized for both classification and regression tasks. One of their notable advantages, distinguishing them from neural networks, is their interpretability. Decision trees offer easily understandable decision rules, in contrast to the complex weight connections found in neural networks [ 33 ]. A decision tree is constructed using a combination of nodes and branches, each serving a specific purpose: • The internal nodes or leaves represent the input predictor variables used for decision making. • Each branch represents a decision based on a particular condition or the probability of an event occurring. • The terminal nodes provide the final decision or outcome. The construction of a decision tree follows a “divide and conquer” approach [ 34 ]. Given a set of k classes, [C1 , C2 , . . . , Ck] , as well as a training set, x= [x1 , x2 , . . . , xm] , the methodology is based on the following principles [35]: • If the training set x contains elements that belong exclusively to a single class Cj , the decision tree terminates at a leaf node that indicates class Cj.
Appl. Sci. 2023,13, 8266 6 of 16 • If x contains features that could correspond to multiple classes, a feature is chosen for testing. This feature has associated labels or possible outcomes [y1 , y2 , . . . , yn] . The training set x is then divided into smaller subsets [x1 , x2 , . . . , xn] , where each subset xi contains the features from x associated with the chosen test label yi . This recursive process is applied to each subset. In the traditional methodology of constructing decision trees, the key aspect lies in how the dataset is split. The selection of a feature test determines how training objects are distributed into subsets, facilitating the construction of subtrees accordingly [ 34 ]. Notable advancements in and variations of this algorithm include C4.5, which employs information theory to evaluate decision tree splits [36]. 2.1.3. Random Forest (RF) The random forest approach, first introduced by Leo Breiman, has emerged as a significant competitor to boosting algorithms [ 37 ]. It comprises a collection of classifiers/regressors based on decision trees, often referred to as “base learners” denoted as h1(x) , h2(x) , . . . , hJ(x) . Each decision tree depends on a random subset of input variables, with the same distribution applied across all trees in the forest. In the context of a random forest, the goal is to find a predictor function, denoted as f(x) , that closely estimates the actual response given a random set of input variables x= [x1 , x2 , . . . , xm] and the corresponding response values y . To achieve this, a loss function is employed to minimize the expected value of the loss [ 38 ]. The set of learners are then combined to yield the final f(x) , which is computed differently depending on whether it is a classification problem (Equation (2)) or a regression problem (Equation (3)): For classification: f(x) = mode h1(x),h2(x),· · · ,hJ(x)(2) For regression: f(x) = 1 J J ∑ j=1 hj(x)(3) In both cases, the combination of the individual base learners allows for improved prediction accuracy and robustness in handling complex data patterns. Indeed, a solid understanding of decision trees is crucial for building the random forest algorithm optimally. Decision trees serve as the fundamental building blocks within the random forest framework. Each decision tree in the random forest contributes to the overall predictive power of the algorithm. 2.1.4. Support Vector Regression (SVR) The SVR approach, a machine learning algorithm widely used in regression problems [ 39 ], has its origin in Support Vector Machines (SVM), which are considered a binary classification method with high generalization capability in high-dimensional problems [ 40 ]. While historically SVMs have primarily been utilized for binary classification problems, their applicability has expanded in recent decades to cover multiclass problems and regression tasks, leading to the development of Support Vector Regressors (SVRs) [ 41 ]. Both SVMs and SVRs revolve around constructing a regressor hyperplane that best fits the training dataset. In the case of regression, a tolerance margin is introduced between the samples and the hyperplane, ensuring that the predicted data lie within a specified margin distance. Consequently, the objective becomes selecting a hyperplane with the maximum margin between the support vectors within the dataset. Notably, certain samples may fall outside the tolerance margin and are considered errors, prompting the calculation of their
Appl. Sci. 2023,13, 8266 7 of 16 distance from the nearest boundary, denoted as ε [ 41 ]. To train the model, an optimization problem needs to be solved based on the following equation: min1 2||w||2+C N ∑ i=1 (ξi+ξ∗ i)(4) In the equation, ω represents the magnitude of the hyperplane, while C is a positive constant that determines the tolerance for deviations beyond the support vectors. It is important to note that C should be greater than 0. A high value of C indicates a stricter representation of the dataset by the defined hyperplane, while a small value of C allows for a larger number of errors to be permitted by the model. The effectiveness of the algorithm relies on properly selecting and implementing the C parameter as well as the chosen kernel [42]. 2.1.5. Multilayer Perceptron (MLP) The MLP algorithm is one of the most widely used machine learning tools for both regression and classification problems. It appeared in the 1980s to overcome the problem of the simple perceptron, and therefore the impossibility of learning classes of nonlinearly separable functions; unlike it, networks with an indeterminate number of hidden layers can be constructed. It is a type of artificial neural network with forward propagation, i.e., no neural output constitutes an input for the neurons of the same or previous layers. The main advantage over its predecessor is that the inclusion of a single level of hidden neurons is sufficient for the network to act as a universal function approximator [ 31 , 43 ]. As mentioned above, in the MLP algorithm we can find an indetermined number of hidden layers. These are placed consecutively and consist of neurons that are connected to each other through weighted links, identified in the network as ω (Figure 2). The learning process will consist of finding those values of ω that make the error between the output given by the MLP and the expected output as small as possible. The learning method normally employed is Stochastic Gradient Descent (SGD) or the backpropagation algorithm, which can be found in detail in [ 44 ]. However, other alternatives are used, such as the Levenberg–Marquardt algorithm, applied in the experiments of this study [45]. Hidden layerInput layer Output layer ω Figure 2. Multilayer perceptron structure with one hidden layer.
Appl. Sci. 2023,13, 8266 8 of 16 2.1.6. Synthetic Minority Over-Sampling Technique (SMOTE) SMOTE is a popular data augmentation technique used in machine learning, specifically for addressing class imbalance problems [ 46 ]. In many real-world classification problems, the dataset may have imbalanced class distributions, where the minority class has significantly fewer instances than the majority class. This class imbalance can pose challenges for machine learning algorithms, as they tend to be biased towards the majority class, leading to poor predictive performance for the minority class. SMOTE addresses this issue by generating synthetic examples for the minority class, effectively oversampling the minority class to balance the class distribution. The technique works by creating synthetic samples that are interpolations between the feature vectors of neighboring instances from the minority class. 3. Experiments and Results This section presents the experiments carried out, as well as the classification and regression results obtained for the locust sighting problem. In this section, we will specify which of the algorithms described in Section 2have been used for regression and which for classification, and we will analyze the performance of all machines for the different scenarios. Please note that all the values shown in the results tables, for both classification and regression, have been obtained from the test set as the average of 10 runs for each of the algorithms. In addition, given the unbalanced nature of the database, the SMOTE technique has been used in the classification algorithms in order to balance the number of samples in the majority and minority classes. The difference in the results between using SMOTE and not using it in all classification cases will also be analyzed. Table 2shows the parameters used in the ML algorithms tested in this paper. Table 2. Hyper-parameter values for every ML model considered in the experiments. Model Hyper-Parameter Meaning Values DT criterion Function to measure the quality of a split squared error maxDepth Maximum allowed depth for trees unbounded min_samples_split Number of samples required to split an internal node 2 RF NNumber of weak learners (trees) 100 maxDepth Maximum allowed depth for trees unbounded SVR KKernel sigmoid γKernel coefficient 1 (n_samples·variables) CRegularization parameter 1 eNo penalty associated with points predicted 0.1 MLP NNumber of hidden layers 3 ˜ NNumber of neurons per layer [50, 30, 10] activation Activation function for the hidden layer relu max_iter Maximum number of iterations 3000 learning_rate_init The initial learning rate used 0.001 3.1. Classification and Regression Metrics In this paper, we are dealing with a classification and regression problem, so it is necessary to analyze the metrics required in each case. We will begin with a description of the classification metrics used in this study, whose scalar and graphical analysis allows us to perform a correct interpretation for the evaluation of the different models [ 47 ]. We consider four scalar metrics: the area under the ROC curve (AUC), precision, recall and F-score (sometimes known as F1-score). In some cases, we will add the ROC curve as a graphical interpretation of the results. A brief description of these metrics is as follows: Precision =TP TP +FP (5)
Appl. Sci. 2023,13, 8266 9 of 16 Recall =TP TP +FN (6) F-score =2Precision ·Recall Precision +Recall, (7) where TP is the number of true-positive samples, FP is the number of false-positive samples and FN is the number of false-negative samples. Therefore, the precision metric indicates the number of positive samples that were correctly classified with respect to the total number of predicted positive samples (true and false). The recall metric expresses the ratio of correctly classified positive samples with respect to the false-negative and true-positive samples. We must pay special attention to this metric, since a false negative (in our case, suggesting that there was no locust presence when in fact there was) may imply greater losses than false positives. Finally, the F-score metric is the harmonic mean of precision and recall. Analyzing the conclusions derived from the precision and recall metrics, a low F-score value caused by a low recall may imply a worse classifier than if this low value were caused by a low precision. The AUC is related to the ROC curve, so we will first define this graphical classification metric. The ROC curve is a two-dimensional graph where the parameter true-positive rate (TPR), or recall, represents the y-axis, and false-positive rate ( FPR =FP/FP +TN , where TN is the number of true-negative samples) represents the x-axis. So, this helps us to understand the benefits, which would be given by the true positives, versus the costs, given by the false positives, of a binary classifier. The AUC is used to calculate the area under the ROC curve. The values of this parameter range from 0 to 1, so there are no classifiers with good performance with AUC values below 0.5. For the analysis of the performance of the regression machines, we will use the following scalar metrics: the Mean Squared Error (MSE), Mean Average Error (MAE), Pearson correlation coefficient (R 2 ) and the relative versions of MSE and MAE (MSER and MSER): MSE =1 N n ∑ i=1 (yi−ˆ yi)2(8) MAE =1 N n ∑ i=1 |yi−ˆ yi|(9) R2=∑n i=1(yi−E[y])( ˆ yi−E[ˆ y]) q∑n i=1(yi−E[y])2q∑n i=1(ˆ yi−E[ˆ y])2(10) MSER = 1 N∑n i=1(yi−ˆ yi)2 (¯ y)2(11) MAER = 1 N∑n i=1|yi−ˆ yi| ¯ y, (12) where ˆ yi represents the predicted output of the regressor for the sample i , and yi is the real value or expected value for the sample i . According to these metrics, a good performance of the regressor is demonstrated by MSE and MAE values close to zero, as well as R2 values close to 1. Thus, the R2 metric gives an idea of how correlated the regressor output and the real value are. 3.2. Results and Discussion We begin by analyzing the results obtained by the classification machines. The ones considered in this study are SVM, DT and RF, some of the most successful existing classification approaches. Table 3shows the results obtained for each of these machines, for the three scenarios considered, without applying the SMOTE balancing technique.
Appl. Sci. 2023,13, 8266 16 of 16 46. Chawla, N.V.; Bowyer, K.W.; Hall, L.O.; Kegelmeyer, W.P. SMOTE: Synthetic minority over-sampling technique. J. Artif. Intell. Res. 2002,16, 321–357. [CrossRef] 47. Tharwat, A. Classification assessment methods. Appl. Comput. Inform. 2020,17, 168–192. [CrossRef] Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.