# Postearthquake Casualty Prediction Based on Heatmaps and Wavelet Supporting Vector Machines

Authors: Jidong Guo; Menghao Xi; Yong Cheng; Heyan Jiao
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

The prediction of casualties in earthquakes is very important for improving the efficiency of emergency rescue measures and reducing the number of casualties. Given the time lag and poor accuracy of population density data published in statistical yearbooks, a Baidu heatmap is used in this study to accurately estimate the regional population density. Based on the standard support vector machine (SVM) prediction model, a piecewise loss function and a robust wavelet kernel function are proposed to effectively reduce the prediction error. Given a characteristic attribute set of factors related to earthquake casualties, the new prediction model is tested in 34 cases involving earthquake cases on the Chinese mainland since 2011. Compared with other prediction techniques, the proposed robust wavelet SVM can converge more quickly, and the prediction error is lower than that of the standard backpropagation neural network (BPNN) and standard SVM.


---

## Body

## 1. Introduction

Predicting the number of casualties in earthquakes is a basic step that can aid in reducing the number of casualties and improving the efficiency/effectiveness of emergency response measures [1]. In particular, in the few hours immediately after an earthquake, when information about the earthquake-stricken area is extremely scarce, the prediction of earthquake casualties through a process known as blind estimation is crucial for the allocation of rescue personnel and medical resources. In addition, predictions of the actual number of casualties and risk levels of earthquake victims can provide a solid foundation for improving infrastructure and building quality, as well as strengthening disaster prevention, mitigation, and preparedness.The theoretical framework traditionally used for the analysis of casualties in earthquakes includes three main components: the danger level of disaster factors, the vulnerability of disaster-bearing bodies or society, and the emergency management capability in the area [2]. Most previous research studies were based on this theoretical framework. In terms of earthquakes, these three types of components can be grouped into earthquake factors, statistical population-related factors, and emergency management factors. Many researchers have attempted to analyse the correlations between earthquake casualties and various factors based on a certain aspect of this theoretical framework. For example, Oike examined the relationship between the number of casualties and earthquake intensity and found that there is a strong correlation between the maximum casualty rate and the intensity of an earthquake [3]. Jaiswal and Wald established an empirical function for the earthquake intensity and mortality suitable for different regions of the world [4]. This univariate analysis method is simple and fast and uses few parameters, but it has been applied in an insufficient number of cases. Therefore, such predictions must be made on a global scale, resulting in low prediction accuracy. There are also many researchers who not only consider earthquake-related factors but also the vulnerability of building structures during earthquakes or just use vulnerability to quickly predict the number of casualties after an earthquake. Alternatively, some scholars use the socially acceptable mortality rate to estimate the vulnerability or resilience level that a building structure needs to achieve. For example, Ohta et al. analysed the relationship between the number of deaths and the number of destroyed houses [5]. Additionally, Samardjieva et al. studied the relationship among the death rate, ground movement-related factors, and the number of destroyed houses [6]. However, Bastami et al. suggested that there is a certain randomness in the number of casualties during an earthquake event and presented a functional expression linking the number of casualties, earthquake intensity, and quality of building structures [7]. So and Spence constructed an event tree model for estimating the number of casualties based on the indoor casualty rates in building types with different resilience levels [8]. Some scholars continue to revise the parameters in the above models according to the building performance requirements and the casualty data obtained for actual earthquakes [9, 10].With the continuous development of the economy and society, the progress of global urbanization, and the rapid improvement of emergency response capabilities based on modern science and technology, researchers have begun to gradually incorporate some social factors and emergency rescue capabilities into prediction models of earthquake-related casualties. The postearthquake casualty estimation model established by Coborn et al. considers five factors, including the average number of people in a building, the building usage time, the number of trapped people, the building collapse mortality rate, and the rescue efficiency [11]. Based on analysing the number of casualties caused by major global earthquakes in the last century, Li et al. constructed an empirical relationship model between earthquake casualties and parameters such as magnitude, the affected area, and the population density. Other studies have considered factors never incorporated into previous models, including demographic characteristics such as the male-to-female ratio and age structure [12], as well as casualties from secondary disasters caused by earthquakes, including fires, landslides, and tsunamis [13]. Koyama et al. selected the occupancy rate, earthquake intensity, building structure type, and house collapse rate as the factors that affect the number of earthquake casualties [14]. Li et al. considered the amount of damage to houses at different levels and found that the casualties stemming from earthquake disasters can be estimated as the sum of the casualties caused by the destruction of houses at all risk levels [15].With the continuous progress of information technology, especially artificial intelligence analysis technology, considering the limited availability, nonlinearity, and high dimensionality of earthquake damage data, researchers have begun to apply intelligent analysis methods in earthquake casualty prediction models, such as BPNNs [16], SVMs [17], artificial neural networks (ANNs) [18], and case-based reasoning (CBR) [19]. These methods are not limited by the basic assumptions of traditional empirical statistical methods nor do they impose constraints on the relationships among influencing factors. By simulating the learning modes of the human brain, they can obtain hidden casualties from a large amount of earthquake damage data. Based on earthquake damage data in Iran, Aghamohammadi et al. used a BPNN method to establish an evaluation model for the degree and distribution of casualties caused by building damage [17]. Guo and Jiao established an ANN prediction model based on 21 earthquakes with magnitudes above 5.0 in Turkey using the earthquake occurrence time, earthquake magnitude, and population density as input factors [18].In previous studies of the casualties caused by earthquakes, some researchers focused on earthquake hazards, while others analysed the vulnerability of hazard-bearing bodies; additionally, some studies considered these two factors simultaneously. However, with the rapid development of information and communication technology, humans now better understand the evolution of earthquakes. The available emergency management capabilities, such as earthquake monitoring and early warning systems, and disaster prevention, mitigation, and relief techniques have been greatly improved, thus playing increasingly important roles in reducing earthquake casualties. Therefore, the above literature provides an important reference for constructing an index system for earthquake casualties and provides a theoretical analysis framework for updating the existing earthquake case databases. Based on the above research results, a more scientific and comprehensive index system for earthquake casualties is developed in this study by considering three aspects of earthquake disasters: hazard factors, disaster-bearing bodies, and emergency management capabilities.In addition, most of the abovementioned studies were based on the data provided in historical earthquake cases, which was used in regression analysis and prediction tasks. Thus, the earthquake characteristics and real-time data were not combined, that is, the specific features of an area during an earthquake, such as the volatility of demographic factors, were not considered, consequently influencing the reliability of the prediction results. Although some emerging artificial intelligence technologies, such as SVMs and neural networks, are being applied to achieve breakthroughs in earthquake casualty prediction, related research is still rare. In most cases, the index system used is not representative, or only one prediction method is offered without any comparisons among different techniques. These issues can decrease the reliability of the prediction results.In this study, the long-time interval of the population census in China, which is conducted every 10 years, is considered. Moreover, with the rapid development of urbanization in China, population flows among different cities are becoming increasingly frequent, and the gap between traditional and real-time demographic data is growing. Therefore, a Baidu heatmap is used to obtain real-time population statistics, and the statistical errors are found to be within the allowable range of less than 5% [20]. Additionally, combined with the theoretical framework for the analysis of casualties during an earthquake, an index system is constructed, and a case database is constructed. To improve the prediction efficiency of the standard SVM and reduce the prediction error, a new robust wavelet SVM is designed in this study, and verification is performed based on the case database. During the SVM training process, the parameters of the SVM kernel function are continuously adjusted to improve the prediction accuracy.


## 2. Methodology

The technical route of this study is shown in Figure1.Figure 1
S-shaped membership function.


### 2.1. Impact Factor Sets Associated with Earthquake Casualties and Data Preprocessing Steps

An earthquake case database provides the basis for predicting the number of casualties after an earthquake. In traditional earthquake case bases, each case is associated with one earthquake only [16–19]. In reference [19], a new way to construct earthquake case bases was proposed, and this approach can greatly extend the number of earthquake cases in a database. Therefore, this earthquake database method is used in this article, and the traditional concept of earthquake magnitudes on the Richter scale is abandoned; instead, an earthquake intensity-based case collection method is used for various cities. Notably, prediction results generally become increasingly accurate as the amount of considered data increases [19]. Nine impact factors, or feature attributes, related to casualties during earthquakes are shown in Table 1, and the same factors were used in previous research [19].Table 1
Feature attributes related to earthquake casualties.
Factor categoryFeature attributeSymbolUnitHazard factorRichter scalef1degreeEarthquake timef2hour/minuteDisaster-bearing bodyLocal geological conditionsf3--Designed building earthquake intensityf4degreePopulation densityf5People per km2GDP per capitaf6Thousand RMB yuanEmergency management capabilityNumber of registered medical stafff7per thousand peopleNumber of registered emergency respondersf8per thousand peopleEmergency management levelf9--As shown in Table1, some feature attributes have objectively precise values, but some do not and are objectively uncertain, such as the emergency management level and local geological conditions. Even if some feature attributes, such as the earthquake time, can be expressed with definite numerical values, it is still necessary to apply proper fuzzy functions to describe the corresponding degrees of impact on casualties. There are two main reasons for the introduction of fuzzy functions for data preprocessing. First, the data can be standardized to the range of 0 to 1, which can eliminate the unit and order of magnitude differences for various feature attributes. Second, proper fuzzy functions can accurately quantify the influence of each feature attribute on earthquake casualties.In practical postearthquake damage assessment, some feature attributes are positively correlated with the number of casualties after the earthquake, including characteristic attributesf1 and f5; some are negatively correlated, including characteristic attributes f3, f4, f6, f7, f8, and f9. There is one exception: characteristic attribute f2, which is neither positively nor negatively correlated with the number of casualties caused by earthquakes. Therefore, for the feature attributes other than f2, various S-shaped membership functions are used, and a trapezoidal membership function is used for f2. Table 2 gives the parameters of the membership functions based on the distribution characteristics of the sample data from the case base. These parameters correspond to the parameters in the membership functions of different feature attributes [19]. According to these parameters, the membership degrees of the feature attribute values can be calculated, that is, all the feature attributes are standardized, and their values are mapped to the closed interval [0, 1].Table 2
Membership functions and parameters for seismic feature attributes.
Parameterabcdf168.511—f27121720f30.2630.5810.899—f467.59—f50.878390.900773.164—f61.34626.44051.533—f71.2516.48911.727—f80.290.7011.112—f90.3860.6470.909—For the feature attributes with positive correlations, the sigmoid membership function is adopted, as explained in definition (1). For the characteristic attributes with negative correlations, the inverse sigmoid membership function is used, that is, the traditional sigmoid membership function is mirrored over the symmetry axisx=b. It should be noted that for the feature attribute f2, noon is set as the temporal starting point, and 24 hours is selected as the timing period. Then, the original earthquake occurrence time is simply linearly transformed, and the trapezoidal membership function given in Definition 1 is used to standardize it.To describe the uncertainty in human language and thinking, Zadeh first proposed the concept of fuzzy sets [21] as follows.Definition 1.
IfX is a collection of objects denoted generically by x, then a fuzzy set A˜ in X is a set of ordered pairs.(1)A˜=x,μA˜x|x∈X,where μA˜x is called the membership function, which maps X to the membership space A˜, that is, the closed interval [0, 1].
Fuzzy sets are represented by describing their membership functions. In the expression of seismic feature attributes, S-shaped membership functions or trapezoidal membership functions are usually used, and they are explained as follows.
The S-shaped membership function is shown in Figure2, and its expression is as follows:(2)μSx;a,b,c=0,0≤x≤a2x−ac−a2,a≤x≤b1−2x−cc−a2,b≤x≤c1,x≥c..
There is a relationship among the three parametersa, b, and c: b=a+c/2.
The trapezoidal membership function is shown in Figure3.
The expression of the trapezoidal membership function is as follows, and there is no quantitative relationship among the four parameters:(3)μTx;a,b,c,d=0,x≤ax−ab−a,a≤x≤b1,b≤x≤cd−xd−c,c≤x≤d0,x≥d..Figure 2
S-shaped membership function.Figure 3
Trapezoidal membership function.


### 2.2. Heatmap Data Processing Technology

Considering the shortcomings of traditional demographic data, we use Baidu heatmap technology to estimate the urban population.In 2011, the Baidu Group launched the world’s first map navigation application with an intelligent heatmap function. The Baidu heatmap is based on mobile phone users. When users access hundreds of apps provided by the Baidu Group or other apps based on Baidu map location services, they use a GPS, the Beidou positioning system, mobile phone base stations, WiFi, and other traceable tools. Therefore, the number of mobile phone users in different areas, as visualized in a Baidu heatmap, can be determined after density analysis and various calculations.In a Baidu heatmap, the population density in different regions is displayed in a specific way. The darker the colour of an area is, the greater the population density in the area, and vice versa. Figure4 shows a series of heatmaps for a city at different times of the day. There are seven different colours used to represent the population density.Figure 4
An example Baidu heatmap. (a) Heatmap at 8 : 00 am, (b) heatmap at 12 : 00, and (c) heatmap at 18 : 00 pm.
(a)(b)(c)In addition to the Baidu heatmap data being actively shared by vendors, the personal data of users are obtained and desensitized to avoid personal privacy issues. Baidu Maps responds to nearly 100 billion requests for location services every day. These requests are not evenly distributed within a day. Therefore, Baidu heatmaps also dynamically change in real time and are updated every 15 minutes. Relevant research shows that the deviations in the living and working populations obtained from Baidu heatmap big data from real statistical data are less than 5% [20, 22]; thus, the Baidu heatmaps are generally consistent with the real situation and provide an important data basis for postearthquake loss prediction, demand assessment, and emergency rescue management.Through Baidu heatmaps, the population density at a specific geographic coordinate location can be queried, and the overall population distribution and flow status can be visually analysed. It is not possible to directly calculate the total regional population required for disaster prediction, that is, the heatmap data need to be reprocessed. We used the ArcGIS 10.4 software to project the heatmap images for various cities in China from the original WGS84 coordinates to the UTM coordinate system and performed image registration on all obtained Baidu heatmaps. Specifically, to calculate the total population of the region, we use the following formula:(4)p=∑i=17niadi,where ni is the total number of pixels of the colour i in the heatmap, a indicates the area represented by the basic pixel element, and di denotes the population density for colour i.The population density data in a heatmap have upper and lower intervals, and some are open intervals. Thus, we use the following processing methods.For population density data with upper and lower boundsdl,ul, we apply the following formula:(5)d=dl+ul2.For population density with an open upper intervaldl,+∞, the formula is as follows:(6)dj=dlj+ulj−1−dlj−12.For population density with an open lower interval−∞,ul, the formula is as follows:(7)dj=ulj−ulj+1−dlj+12.


### 2.3. Robust Wavelet Support Vector Machine

An SVM is a machine learning tool, and the first SVM was proposed by Cortes and Vapnik [23]. SVMs are widely used in the fields of classification and prediction. The disadvantages of SVM technology are that the insensitive loss function used cannot effectively address outlier data noise in a sample, and the noise reduction ability is often insufficient. Moreover, the generalization ability of machine learning methods can be poor [24, 25]. Therefore, a new loss function is constructed, and a wavelet kernel function that can effectively reduce prediction errors is designed.The selection and construction of different loss functions will influence the structure of SVMs and the effect the subsequent classification and prediction results. Currently, commonly used loss functions include the Gaussian loss function, the Laplace loss function, the hinge loss function, the polynomial loss function, and various piecewise loss functions [26]. These loss functions yield different processing results for samples with different distributions. The Gaussian function is suitable for dealing with normally distributed noise data, the Laplace function is effective in cases with outliers, and the hinge function is ideal for the Lagrangian transformation of slack variables in constraints.The data used for earthquake casualty assessment are commonly characterized by a high degree of dispersion, many outliers, and high nonlinearity. It is difficult to suppress all kinds of characteristic data in a sample with a single loss function. Therefore, we hope to use a piecewise function that combines the advantages of the above functions. For outlier data, we use the Laplace loss function; for general noise data, we use the Gaussian loss function; and for normal data, we do not do any processing. In this way, each type of feature data is divided into five segments, and the function expression is as follows:(8)Lx=dxul−x−12d2x<−xul,12xul−x2−xul<x<−xdl,0−xdl<x<xdl,12x−xul2xdl<x<xul,dx−xul−12d2x>xul,where d=xul−xdl.The kernel function in an SVM is used to solve for the inner product in the high-dimensional space and minimize the nonlinear classification error. At present, the commonly used kernel functions include the radial basis kernel function, Fourier kernel function, sigmoid kernel function, polynomial kernel function, linear kernel function, and others [27, 28]. These kernel functions can effectively reduce the prediction error, but the result is still not ideal in some cases. In this study, the wavelet basis function is used as a prototype, and a wavelet kernel function that can satisfy the Mercer condition and effectively reduce error without increasing the computational complexity is proposed. The Morlet wavelet function form can satisfy the Mercer condition, so we consider using the Morlet wavelet basis function to express this condition in a specific form; then, the wavelet-kernel function can be used in an SVM. The Morlet wavelet basis function and the robust wavelet kernel function we construct are as follows:(9)θx=cosαxiexp−xi2,α∈R,Kx,x′=∏i=1ncosα⋅xi−xi′βiexp−xi−xi′22βi2,where K is the support vector kernel required by the proposed SVM, and the parameters α and β need to be determined in the function training process. The parameter values are not initially known, and the cross-validation method [29, 30] is applied to determine the parameter values during the numerical experiment to obtain the best values for these parameters.Due to the high dimensionality of earthquake casualty impact factors, the correlations among types of index data are nonlinear. In this work, a robust wavelet SVM prediction model is established to map index statistics to high-dimensional features through a nonlinear mapping space, establish an optimal linear regression function in this high-dimensional feature space, and then use this optimal linear regression function to predict the casualties for earthquake disasters in near real time with both a standard SVM and a robust wavelet SVM.Using the previously constructed wavelet kernel function, duality principle, and Karush–Kuhn‒Tucker conditions, a dual programming problem is obtained from the original problem. According to optimization theory, the optimal regression estimation function for the robust wavelet SVM is obtained as the casualty prediction model. Through the output expression of the robust wavelet SVM, the impact factor data can be regressed, and the number of earthquake casualties can be predicted.(10)fx=∑i=1nβi∗−βi∏i=1ncosαxi⋅xj−xijβiexp−xj−xij22βi2+1,where xj represents the component j, xi is the vector of training sample i, and xij represents the component j of training sample xi.


## 2.1. Impact Factor Sets Associated with Earthquake Casualties and Data Preprocessing Steps

An earthquake case database provides the basis for predicting the number of casualties after an earthquake. In traditional earthquake case bases, each case is associated with one earthquake only [16–19]. In reference [19], a new way to construct earthquake case bases was proposed, and this approach can greatly extend the number of earthquake cases in a database. Therefore, this earthquake database method is used in this article, and the traditional concept of earthquake magnitudes on the Richter scale is abandoned; instead, an earthquake intensity-based case collection method is used for various cities. Notably, prediction results generally become increasingly accurate as the amount of considered data increases [19]. Nine impact factors, or feature attributes, related to casualties during earthquakes are shown in Table 1, and the same factors were used in previous research [19].Table 1
Feature attributes related to earthquake casualties.
Factor categoryFeature attributeSymbolUnitHazard factorRichter scalef1degreeEarthquake timef2hour/minuteDisaster-bearing bodyLocal geological conditionsf3--Designed building earthquake intensityf4degreePopulation densityf5People per km2GDP per capitaf6Thousand RMB yuanEmergency management capabilityNumber of registered medical stafff7per thousand peopleNumber of registered emergency respondersf8per thousand peopleEmergency management levelf9--As shown in Table1, some feature attributes have objectively precise values, but some do not and are objectively uncertain, such as the emergency management level and local geological conditions. Even if some feature attributes, such as the earthquake time, can be expressed with definite numerical values, it is still necessary to apply proper fuzzy functions to describe the corresponding degrees of impact on casualties. There are two main reasons for the introduction of fuzzy functions for data preprocessing. First, the data can be standardized to the range of 0 to 1, which can eliminate the unit and order of magnitude differences for various feature attributes. Second, proper fuzzy functions can accurately quantify the influence of each feature attribute on earthquake casualties.In practical postearthquake damage assessment, some feature attributes are positively correlated with the number of casualties after the earthquake, including characteristic attributesf1 and f5; some are negatively correlated, including characteristic attributes f3, f4, f6, f7, f8, and f9. There is one exception: characteristic attribute f2, which is neither positively nor negatively correlated with the number of casualties caused by earthquakes. Therefore, for the feature attributes other than f2, various S-shaped membership functions are used, and a trapezoidal membership function is used for f2. Table 2 gives the parameters of the membership functions based on the distribution characteristics of the sample data from the case base. These parameters correspond to the parameters in the membership functions of different feature attributes [19]. According to these parameters, the membership degrees of the feature attribute values can be calculated, that is, all the feature attributes are standardized, and their values are mapped to the closed interval [0, 1].Table 2
Membership functions and parameters for seismic feature attributes.
Parameterabcdf168.511—f27121720f30.2630.5810.899—f467.59—f50.878390.900773.164—f61.34626.44051.533—f71.2516.48911.727—f80.290.7011.112—f90.3860.6470.909—For the feature attributes with positive correlations, the sigmoid membership function is adopted, as explained in definition (1). For the characteristic attributes with negative correlations, the inverse sigmoid membership function is used, that is, the traditional sigmoid membership function is mirrored over the symmetry axisx=b. It should be noted that for the feature attribute f2, noon is set as the temporal starting point, and 24 hours is selected as the timing period. Then, the original earthquake occurrence time is simply linearly transformed, and the trapezoidal membership function given in Definition 1 is used to standardize it.To describe the uncertainty in human language and thinking, Zadeh first proposed the concept of fuzzy sets [21] as follows.Definition 1.
IfX is a collection of objects denoted generically by x, then a fuzzy set A˜ in X is a set of ordered pairs.(1)A˜=x,μA˜x|x∈X,where μA˜x is called the membership function, which maps X to the membership space A˜, that is, the closed interval [0, 1].
Fuzzy sets are represented by describing their membership functions. In the expression of seismic feature attributes, S-shaped membership functions or trapezoidal membership functions are usually used, and they are explained as follows.
The S-shaped membership function is shown in Figure2, and its expression is as follows:(2)μSx;a,b,c=0,0≤x≤a2x−ac−a2,a≤x≤b1−2x−cc−a2,b≤x≤c1,x≥c..
There is a relationship among the three parametersa, b, and c: b=a+c/2.
The trapezoidal membership function is shown in Figure3.
The expression of the trapezoidal membership function is as follows, and there is no quantitative relationship among the four parameters:(3)μTx;a,b,c,d=0,x≤ax−ab−a,a≤x≤b1,b≤x≤cd−xd−c,c≤x≤d0,x≥d..Figure 2
S-shaped membership function.Figure 3
Trapezoidal membership function.


## 2.2. Heatmap Data Processing Technology

Considering the shortcomings of traditional demographic data, we use Baidu heatmap technology to estimate the urban population.In 2011, the Baidu Group launched the world’s first map navigation application with an intelligent heatmap function. The Baidu heatmap is based on mobile phone users. When users access hundreds of apps provided by the Baidu Group or other apps based on Baidu map location services, they use a GPS, the Beidou positioning system, mobile phone base stations, WiFi, and other traceable tools. Therefore, the number of mobile phone users in different areas, as visualized in a Baidu heatmap, can be determined after density analysis and various calculations.In a Baidu heatmap, the population density in different regions is displayed in a specific way. The darker the colour of an area is, the greater the population density in the area, and vice versa. Figure4 shows a series of heatmaps for a city at different times of the day. There are seven different colours used to represent the population density.Figure 4
An example Baidu heatmap. (a) Heatmap at 8 : 00 am, (b) heatmap at 12 : 00, and (c) heatmap at 18 : 00 pm.
(a)(b)(c)In addition to the Baidu heatmap data being actively shared by vendors, the personal data of users are obtained and desensitized to avoid personal privacy issues. Baidu Maps responds to nearly 100 billion requests for location services every day. These requests are not evenly distributed within a day. Therefore, Baidu heatmaps also dynamically change in real time and are updated every 15 minutes. Relevant research shows that the deviations in the living and working populations obtained from Baidu heatmap big data from real statistical data are less than 5% [20, 22]; thus, the Baidu heatmaps are generally consistent with the real situation and provide an important data basis for postearthquake loss prediction, demand assessment, and emergency rescue management.Through Baidu heatmaps, the population density at a specific geographic coordinate location can be queried, and the overall population distribution and flow status can be visually analysed. It is not possible to directly calculate the total regional population required for disaster prediction, that is, the heatmap data need to be reprocessed. We used the ArcGIS 10.4 software to project the heatmap images for various cities in China from the original WGS84 coordinates to the UTM coordinate system and performed image registration on all obtained Baidu heatmaps. Specifically, to calculate the total population of the region, we use the following formula:(4)p=∑i=17niadi,where ni is the total number of pixels of the colour i in the heatmap, a indicates the area represented by the basic pixel element, and di denotes the population density for colour i.The population density data in a heatmap have upper and lower intervals, and some are open intervals. Thus, we use the following processing methods.For population density data with upper and lower boundsdl,ul, we apply the following formula:(5)d=dl+ul2.For population density with an open upper intervaldl,+∞, the formula is as follows:(6)dj=dlj+ulj−1−dlj−12.For population density with an open lower interval−∞,ul, the formula is as follows:(7)dj=ulj−ulj+1−dlj+12.


## 2.3. Robust Wavelet Support Vector Machine

An SVM is a machine learning tool, and the first SVM was proposed by Cortes and Vapnik [23]. SVMs are widely used in the fields of classification and prediction. The disadvantages of SVM technology are that the insensitive loss function used cannot effectively address outlier data noise in a sample, and the noise reduction ability is often insufficient. Moreover, the generalization ability of machine learning methods can be poor [24, 25]. Therefore, a new loss function is constructed, and a wavelet kernel function that can effectively reduce prediction errors is designed.The selection and construction of different loss functions will influence the structure of SVMs and the effect the subsequent classification and prediction results. Currently, commonly used loss functions include the Gaussian loss function, the Laplace loss function, the hinge loss function, the polynomial loss function, and various piecewise loss functions [26]. These loss functions yield different processing results for samples with different distributions. The Gaussian function is suitable for dealing with normally distributed noise data, the Laplace function is effective in cases with outliers, and the hinge function is ideal for the Lagrangian transformation of slack variables in constraints.The data used for earthquake casualty assessment are commonly characterized by a high degree of dispersion, many outliers, and high nonlinearity. It is difficult to suppress all kinds of characteristic data in a sample with a single loss function. Therefore, we hope to use a piecewise function that combines the advantages of the above functions. For outlier data, we use the Laplace loss function; for general noise data, we use the Gaussian loss function; and for normal data, we do not do any processing. In this way, each type of feature data is divided into five segments, and the function expression is as follows:(8)Lx=dxul−x−12d2x<−xul,12xul−x2−xul<x<−xdl,0−xdl<x<xdl,12x−xul2xdl<x<xul,dx−xul−12d2x>xul,where d=xul−xdl.The kernel function in an SVM is used to solve for the inner product in the high-dimensional space and minimize the nonlinear classification error. At present, the commonly used kernel functions include the radial basis kernel function, Fourier kernel function, sigmoid kernel function, polynomial kernel function, linear kernel function, and others [27, 28]. These kernel functions can effectively reduce the prediction error, but the result is still not ideal in some cases. In this study, the wavelet basis function is used as a prototype, and a wavelet kernel function that can satisfy the Mercer condition and effectively reduce error without increasing the computational complexity is proposed. The Morlet wavelet function form can satisfy the Mercer condition, so we consider using the Morlet wavelet basis function to express this condition in a specific form; then, the wavelet-kernel function can be used in an SVM. The Morlet wavelet basis function and the robust wavelet kernel function we construct are as follows:(9)θx=cosαxiexp−xi2,α∈R,Kx,x′=∏i=1ncosα⋅xi−xi′βiexp−xi−xi′22βi2,where K is the support vector kernel required by the proposed SVM, and the parameters α and β need to be determined in the function training process. The parameter values are not initially known, and the cross-validation method [29, 30] is applied to determine the parameter values during the numerical experiment to obtain the best values for these parameters.Due to the high dimensionality of earthquake casualty impact factors, the correlations among types of index data are nonlinear. In this work, a robust wavelet SVM prediction model is established to map index statistics to high-dimensional features through a nonlinear mapping space, establish an optimal linear regression function in this high-dimensional feature space, and then use this optimal linear regression function to predict the casualties for earthquake disasters in near real time with both a standard SVM and a robust wavelet SVM.Using the previously constructed wavelet kernel function, duality principle, and Karush–Kuhn‒Tucker conditions, a dual programming problem is obtained from the original problem. According to optimization theory, the optimal regression estimation function for the robust wavelet SVM is obtained as the casualty prediction model. Through the output expression of the robust wavelet SVM, the impact factor data can be regressed, and the number of earthquake casualties can be predicted.(10)fx=∑i=1nβi∗−βi∏i=1ncosαxi⋅xj−xijβiexp−xj−xij22βi2+1,where xj represents the component j, xi is the vector of training sample i, and xij represents the component j of training sample xi.


## 3. Numerical Experiment, Results, and Discussion

### 3.1. Test Data Preparation and Standardization

According to the data provided by the National Earthquake Data Center of China and the geographical environment, economic, and social data released by the National Bureau of Statistics of China and the Provincial Bureau of Statistics, a case base was constructed to meet the needs of this research. A total of 34 earthquake cases, shown in Table3, with magnitudes of 4 or higher on the Richter scale that have occurred in mainland China since 2011 are selected as samples. Population statistics data were based on the Baidu heatmap data in the same month as the occurrence of each earthquake, and we recorded the data at the beginning of the month, in the middle of the month, and at the end of the month, as well as in the morning, at noon, and in the evening on certain working days. Different heatmap data were extracted, and the demographic data were averaged and amended to replace the original demographic data in the original database.Table 3
Original earthquake cases.
No.f1f2-Hourf2-Minutef3f4f5f6f7f8f9Casualty rate/%15.812580.55868.8617.992.90.720.620.111125.715590.46743.298.834.240.510.540.152235.711190.559188.259.845.230.610.620.168745.7820.549101.5821.253.120.650.564.897155.7820.5818.9536.557.240.630.624.481465.7820.498324.337.142.530.640.640.339075.7820.45864.1727.256.510.650.590.554585.7820.528414.7120.284.480.720.680.250295.7820.54785.3530.746.50.520.570.2362105.7820.546134.3416.584.070.490.540.0100115.7820.46646.348.547.560.50.450.0306126.67450.638126.865.761.881.010.910.1335136.67450.62790.098.732.221.110.880.0405145.9850.63816.9725.086.380.790.830.0096156.516300.569270.899.951.280.70.650.7973166.516300.568162.138.871.250.680.680.0903176.516300.626373.723.784.260.610.710.0007186.516300.577157.4915.832.860.630.680.0079196.621500.56857.4218.426.780.80.720.0126206.316550.48811.7135.1311.310.580.730.0434215.918200.41837.9218.426.780.560.710.0054224.314130.856773.1616.126.710.680.590.0002236.5970.787.277.84.060.730.580.0882245.55580.3571.3445.14.460.850.650.110425721190.39912.530.858.840.930.90.7191264.913150.566292.8447.166.770.520.540.003227622550.628348.243.536.00180.610.610.029328622550.668295.0943.513.850.590.620.0410295.46420.546583.2345.646.720.660.730.002030521470.566142.4319.61.420.530.570.006331521470.566268.521.131.280.750.690.0008326.421480.52852.4836.038.970.560.640.0338337.4240.4992.8222.684.790.390.450.00883464330.578501.2251.535.330.750.690.0195In Table3, we have used the Baidu heatmap data to replace the demographic data. Then, based on fuzzy membership functions, the data in Table 3 are standardized, and the corresponding results are shown in Table 4.Table 4
Standardized earthquake cases.
No.f1f2f3f4f5f6f7f8f910.32000.00000.22220.52440.01530.76820.95030.36250.352620.08000.00000.77780.74520.00590.94850.83750.76140.579830.68000.00000.77780.50000.11730.93510.71100.59350.346840.68000.00000.77780.53390.03370.67260.93610.51090.503950.32000.00000.77780.63610.00100.17360.36730.53440.345660.32000.00000.77780.67950.35020.16020.97030.51580.303370.32000.00000.77780.75280.01330.45570.49670.50830.427280.32000.00000.77780.59850.56860.70260.81000.35340.225590.08000.00000.77780.53170.02370.33420.49790.73650.4874100.00000.00000.77780.55140.05940.80440.85550.79480.5612110.00000.00000.22220.72710.00680.00690.31700.77060.7702120.32000.08330.77780.31450.05290.98000.99280.02490.0000130.08000.08330.77780.33770.02640.94970.98300.00000.0025140.32000.00000.22220.30020.00080.53920.51980.25060.0231150.68000.00000.77780.48450.24390.93351.00000.39870.2782160.32000.00000.22220.47200.08680.94801.00000.43550.2230170.00000.00000.77780.32330.46550.58700.83500.58110.1641180.08000.00000.22220.44280.08190.82230.95280.54340.2188190.32000.56670.22220.48790.01060.75640.44520.23230.1533200.32000.00000.00000.69510.00040.20810.00310.63910.1353210.32000.00000.77780.83230.00450.75640.44520.68550.1674220.00000.00000.77780.01141.00000.81540.45790.43510.4326230.32000.00000.77780.16270.00010.96070.85660.33800.4465240.08000.67780.00000.91580.00000.03200.81200.15850.2802250.68000.46330.22220.86550.00040.33070.15180.07840.0001260.00000.00001.00000.47200.28530.01480.44810.74740.5766270.32000.78331.00000.32540.40390.04950.58870.58670.3795280.32000.78331.00000.24640.28970.04980.87690.62710.3434290.00000.43331.00000.52920.87890.02690.45720.47700.1313300.00000.55670.22220.47200.06680.72290.99950.72720.4695310.00000.55670.77780.48670.23960.67631.00000.30290.1972320.32000.56000.22220.59770.00880.18570.13810.67100.2961330.68001.00000.22220.66940.00000.62550.77150.91020.7820340.32001.00001.00000.44280.75170.00000.69660.29990.2001


### 3.2. Test Process and Results

We divide the above case set into a training subset and test subset at a ratio of 80% to 20%, yielding 27 and 7 cases, respectively, for the two tasks. The optimization function is trained based on 27 cases divided into 10 groups. Additionally,α=1.3152, and other parameters, such as βi∗−βi, in the regression model are calculated. After the parameter values of the regression function are input into the robust wavelet SVM, the earthquake casualty prediction model can be obtained. Then, the model is used to perform tests based on the 28th–34th cases, and the test results are compared with those of the standard SVM and a BPNN in terms of efficiency and prediction accuracy. For the standard SVM, the MATLAB toolbox libsvm3.24 is adopted with the default RBF kernel function. For the BPNN, the standard neural network MATLAB toolbox nntool is used with 10 neurons in the hidden layer; additionally, the learning rate is 0.21, the maximum number of iterations is 5000 times, and the allowable value of the square root error is 0.0005. Comparisons between the measured output curve and the predictions are shown in Table 5 and Figures 5 to 7.Table 5
Prediction error for the casualty rate and a comparison of efficiency.
Optimization toolAverage forecasting deviation /%Average run time /sImproved SVM6.7411.357Standard SVM14.27526.732BPNN22.186189.366Figure 5
Training curve for the casualty rate.Figure 6
Accuracy comparison of the proposed SVM, a standard SVM, and a BPNN.Figure 7
Prediction errors of the improved SVM and other techniques.Figure6 and Table 5 show that the average time required by the proposed robust wavelet SVM to obtain the best solutions is only 1.357 s. Additionally, the prediction accuracy and run speed of this model are superior to those of the standard SVM and BPNN. Figure 7 shows that the new SVM converges fastest. In the process of weight analysis based on the training subset in this case base, the improved SVM yields a prediction error below 3% in approximately 10 epochs. Although the other two methods also achieve an error rate of approximately 3%, their training times are significantly longer.


## 3.1. Test Data Preparation and Standardization

According to the data provided by the National Earthquake Data Center of China and the geographical environment, economic, and social data released by the National Bureau of Statistics of China and the Provincial Bureau of Statistics, a case base was constructed to meet the needs of this research. A total of 34 earthquake cases, shown in Table3, with magnitudes of 4 or higher on the Richter scale that have occurred in mainland China since 2011 are selected as samples. Population statistics data were based on the Baidu heatmap data in the same month as the occurrence of each earthquake, and we recorded the data at the beginning of the month, in the middle of the month, and at the end of the month, as well as in the morning, at noon, and in the evening on certain working days. Different heatmap data were extracted, and the demographic data were averaged and amended to replace the original demographic data in the original database.Table 3
Original earthquake cases.
No.f1f2-Hourf2-Minutef3f4f5f6f7f8f9Casualty rate/%15.812580.55868.8617.992.90.720.620.111125.715590.46743.298.834.240.510.540.152235.711190.559188.259.845.230.610.620.168745.7820.549101.5821.253.120.650.564.897155.7820.5818.9536.557.240.630.624.481465.7820.498324.337.142.530.640.640.339075.7820.45864.1727.256.510.650.590.554585.7820.528414.7120.284.480.720.680.250295.7820.54785.3530.746.50.520.570.2362105.7820.546134.3416.584.070.490.540.0100115.7820.46646.348.547.560.50.450.0306126.67450.638126.865.761.881.010.910.1335136.67450.62790.098.732.221.110.880.0405145.9850.63816.9725.086.380.790.830.0096156.516300.569270.899.951.280.70.650.7973166.516300.568162.138.871.250.680.680.0903176.516300.626373.723.784.260.610.710.0007186.516300.577157.4915.832.860.630.680.0079196.621500.56857.4218.426.780.80.720.0126206.316550.48811.7135.1311.310.580.730.0434215.918200.41837.9218.426.780.560.710.0054224.314130.856773.1616.126.710.680.590.0002236.5970.787.277.84.060.730.580.0882245.55580.3571.3445.14.460.850.650.110425721190.39912.530.858.840.930.90.7191264.913150.566292.8447.166.770.520.540.003227622550.628348.243.536.00180.610.610.029328622550.668295.0943.513.850.590.620.0410295.46420.546583.2345.646.720.660.730.002030521470.566142.4319.61.420.530.570.006331521470.566268.521.131.280.750.690.0008326.421480.52852.4836.038.970.560.640.0338337.4240.4992.8222.684.790.390.450.00883464330.578501.2251.535.330.750.690.0195In Table3, we have used the Baidu heatmap data to replace the demographic data. Then, based on fuzzy membership functions, the data in Table 3 are standardized, and the corresponding results are shown in Table 4.Table 4
Standardized earthquake cases.
No.f1f2f3f4f5f6f7f8f910.32000.00000.22220.52440.01530.76820.95030.36250.352620.08000.00000.77780.74520.00590.94850.83750.76140.579830.68000.00000.77780.50000.11730.93510.71100.59350.346840.68000.00000.77780.53390.03370.67260.93610.51090.503950.32000.00000.77780.63610.00100.17360.36730.53440.345660.32000.00000.77780.67950.35020.16020.97030.51580.303370.32000.00000.77780.75280.01330.45570.49670.50830.427280.32000.00000.77780.59850.56860.70260.81000.35340.225590.08000.00000.77780.53170.02370.33420.49790.73650.4874100.00000.00000.77780.55140.05940.80440.85550.79480.5612110.00000.00000.22220.72710.00680.00690.31700.77060.7702120.32000.08330.77780.31450.05290.98000.99280.02490.0000130.08000.08330.77780.33770.02640.94970.98300.00000.0025140.32000.00000.22220.30020.00080.53920.51980.25060.0231150.68000.00000.77780.48450.24390.93351.00000.39870.2782160.32000.00000.22220.47200.08680.94801.00000.43550.2230170.00000.00000.77780.32330.46550.58700.83500.58110.1641180.08000.00000.22220.44280.08190.82230.95280.54340.2188190.32000.56670.22220.48790.01060.75640.44520.23230.1533200.32000.00000.00000.69510.00040.20810.00310.63910.1353210.32000.00000.77780.83230.00450.75640.44520.68550.1674220.00000.00000.77780.01141.00000.81540.45790.43510.4326230.32000.00000.77780.16270.00010.96070.85660.33800.4465240.08000.67780.00000.91580.00000.03200.81200.15850.2802250.68000.46330.22220.86550.00040.33070.15180.07840.0001260.00000.00001.00000.47200.28530.01480.44810.74740.5766270.32000.78331.00000.32540.40390.04950.58870.58670.3795280.32000.78331.00000.24640.28970.04980.87690.62710.3434290.00000.43331.00000.52920.87890.02690.45720.47700.1313300.00000.55670.22220.47200.06680.72290.99950.72720.4695310.00000.55670.77780.48670.23960.67631.00000.30290.1972320.32000.56000.22220.59770.00880.18570.13810.67100.2961330.68001.00000.22220.66940.00000.62550.77150.91020.7820340.32001.00001.00000.44280.75170.00000.69660.29990.2001


## 3.2. Test Process and Results

We divide the above case set into a training subset and test subset at a ratio of 80% to 20%, yielding 27 and 7 cases, respectively, for the two tasks. The optimization function is trained based on 27 cases divided into 10 groups. Additionally,α=1.3152, and other parameters, such as βi∗−βi, in the regression model are calculated. After the parameter values of the regression function are input into the robust wavelet SVM, the earthquake casualty prediction model can be obtained. Then, the model is used to perform tests based on the 28th–34th cases, and the test results are compared with those of the standard SVM and a BPNN in terms of efficiency and prediction accuracy. For the standard SVM, the MATLAB toolbox libsvm3.24 is adopted with the default RBF kernel function. For the BPNN, the standard neural network MATLAB toolbox nntool is used with 10 neurons in the hidden layer; additionally, the learning rate is 0.21, the maximum number of iterations is 5000 times, and the allowable value of the square root error is 0.0005. Comparisons between the measured output curve and the predictions are shown in Table 5 and Figures 5 to 7.Table 5
Prediction error for the casualty rate and a comparison of efficiency.
Optimization toolAverage forecasting deviation /%Average run time /sImproved SVM6.7411.357Standard SVM14.27526.732BPNN22.186189.366Figure 5
Training curve for the casualty rate.Figure 6
Accuracy comparison of the proposed SVM, a standard SVM, and a BPNN.Figure 7
Prediction errors of the improved SVM and other techniques.Figure6 and Table 5 show that the average time required by the proposed robust wavelet SVM to obtain the best solutions is only 1.357 s. Additionally, the prediction accuracy and run speed of this model are superior to those of the standard SVM and BPNN. Figure 7 shows that the new SVM converges fastest. In the process of weight analysis based on the training subset in this case base, the improved SVM yields a prediction error below 3% in approximately 10 epochs. Although the other two methods also achieve an error rate of approximately 3%, their training times are significantly longer.


## 4. Results and Discussion

The above prediction results regarding the number of earthquake casualties show that the newly proposed wavelet SVM significantly outperforms the two classic techniques in terms of prediction accuracy, convergence, and efficiency of the prediction process; this result verifies that the enhanced efficiency and effectiveness of the newly proposed method. However, some prerequisites considered in this study need to be carefully explored.First, this paper does not use traditional feature attribute normalization techniques, such as the adoption of various utility functions [31], but applies membership functions from fuzzy mathematics. On the one hand, the membership function can be used to convert the values of feature attributes to the interval [0, 1] and eliminate the differences in units and magnitudes. For the feature attributes that display a nonlinear relationship with earthquake casualties, the most common processing technique involves a regression analysis of the corresponding effects to find the best approximate functional relationship; notably, the regression relationship between the earthquake magnitude or the seismic performance of buildings and the number of casualties can be established [3–6]. However, it is currently impossible to determine the real absolute functional relationship among these variables, and only an approximation can be obtained; thus, the limitation discussed for the membership function also exists in this case. In addition, there are various forms of membership functions, and multiple functions may be suitable for describing the functional relationships between indicators and the number of casualties. Therefore, the selection of membership functions is a task that requires further study. For different feature attributes, it may be necessary to choose different membership functions, unlike the S-shaped membership functions used in this paper.Second, we discuss the final weights of the feature attributes given by three different forecasting techniques. Regardless of whether the improved SVM, the standard SVM, or the BPNN is selected, the three feature attributes, namely, the earthquake intensity, population density, and earthquake occurrence time, are regarded as the most important factors that influence the number of casualties during earthquakes. This conclusion is also consistent with the conclusions of many previous studies. However, there are also differences among the three techniques. Specifically, for the improved SVM and the standard SVM, the population density has the greatest impact on the applied weights, followed by the earthquake intensity; however, these influences are opposite for the BPNN. This difference reminds us that future studies still need to consider how to deal with these factors, and methods could be further enhanced or unified. In addition, the fourth important feature attribute in the improved wavelet SVM is the emergency management level, which is not considered in the other methods. This attribute has an impact power greater than 10%, which implies that the differences in this feature attribute, especially considering the rapid developments in earthquake monitoring, early warning, and rescue technology, may be related to differences in the number of casualties to a certain extent.


## 5. Conclusion

Based on a Baidu heatmap, dynamic population data were obtained, and the population density data were calculated to replace the original obsolete statistics. This information was combined with other key feature attributes related to the number of earthquake casualties and used as the input vectors of an SVM. The number of earthquake casualties was selected as the output vector. To overcome the deficiencies in processing outlier data in the traditional SVM prediction process and improve the prediction error, a new loss function and robust wavelet kernel function were proposed. This method reduced deviation between the prediction results and observations and improved the prediction accuracy. Finally, based on an actual earthquake case set, the newly proposed SVM was used to forecast earthquake casualties and was compared to the standard SVM and a BPNN. The results show that the proposed robust wavelet SVM proposed in this article yields better convergence performance and a better prediction effect than the other methods, with lower errors.



---

*Source: 3998655-2022-08-25.xml*