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.
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 Figure 1.

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].
As shown in Table 1, 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 attributes and ; some are negatively correlated, including characteristic attributes , , , , , and . There is one exception: characteristic attribute , which is neither positively nor negatively correlated with the number of casualties caused by earthquakes. Therefore, for the feature attributes other than , various S-shaped membership functions are used, and a trapezoidal membership function is used for . 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].
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 axis . It should be noted that for the feature attribute , 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. If is a collection of objects denoted generically by , then a fuzzy set in is a set of ordered pairs.where is called the membership function, which maps to the membership space , 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 Figure 2, and its expression is as follows:There is a relationship among the three parameters a, b, and c: .
The trapezoidal membership function is shown in Figure 3.
The expression of the trapezoidal membership function is as follows, and there is no quantitative relationship among the four parameters:


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. Figure 4 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.

(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:where is the total number of pixels of the colour in the heatmap, a indicates the area represented by the basic pixel element, and denotes the population density for colour .
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 bounds , we apply the following formula:
For population density with an open upper interval , the formula is as follows:
For population density with an open lower interval , the formula is as follows:
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:where .
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:where 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.where represents the component , is the vector of training sample , and represents the component of training sample .
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 Table 3, 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.
In Table 3, 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.
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, , and other parameters, such as , 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.



Figure 6 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.
Data Availability
The data are available upon related requirements.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This work was jointly supported by the National Natural Science Foundation of China (72174019) and the Fundamental Research Funds for Central Universities (ZY20180229).