## 4 PCA-IWOA-XGBoost Model Construction and Prediction Result Analysis  
### Analysis of Factors Influencing Earthquake Fatalities and Data Acquisition  
Earthquake fatalities are influenced by multiple factors, categorized into earthquake characteristics, building seismic resistance, time factors, and socio-geographic factors, including magnitude, focal depth, epicentral intensity, fortification intensity, the difference between epicentral and fortification intensity, occurrence time, and population density in the epicentral area. Magnitude reflects energy release, with each level increase amplifying the energy by about 31.6 times; high-magnitude events (e.g., the 8.0 Wenchuan earthquake) cause extensive damage and higher fatalities. Shallower focal depths result in stronger ground shaking, while deeper ones cause less damage. Epicentral intensity, measured by the Chinese Seismic Intensity Scale (I-XII), indicates that a high intensity (e.g., IX) leads to severe shaking, building collapse, and more deaths. Fortification intensity reflects a building's seismic resistance; a higher fortification reduces fatalities, while a lower fortification increases collapse risk and deaths. \(\beta\) (epicentral intensity minus fortification intensity): when \(\beta>0\), earthquake intensity exceeds building capacity, causing severe damage; \(\beta=0\) means buildings can withstand shaking, resulting in fewer casualties; \(\beta<0\) indicates safe buildings with minimal death risk. Occurrence time: daytime (7:00-19:00) allows better evasion and lower death risk; nighttime (19:00-7:00) leads to slower reactions and higher indoor population density, increasing fatality risk. Population density: high-density areas (e.g., 150 people/km\({}^{2}\)) see more deaths, while low-density areas (e.g., Dingri County, Tibet, 10 people/km\({}^{2}\)) have fewer deaths. Building codes refer to design standards established based on seismic risk. Stringent building codes (e.g., China's Seismic Design Code for Buildings) require structures to remain intact under specific seismic intensities, reducing collapse risk and thus fatalities. Conversely, areas with no or poorly enforced codes experience higher collapse rates, leading to increased casualties. Topography significantly affects earthquake fatalities. Steep mountainous or sloped areas are prone to landslides or debris flows triggered by earthquakes, increasing casualty risks. Flat plains typically experience less topographic amplification, resulting in fewer fatalities. Additionally, topography influences seismic wave propagation, with complex terrain potentially amplifying local shaking. Building quality directly impacts a structure's performance during an earthquake. High-quality materials and construction practices enhance seismic resistance, reducing collapse and fatalities. Poor-quality buildings (e.g., those with substandard materials or construction) are more likely to fail, increasing casualty risks. Urban-rural differences significantly affect earthquake fatalities. Urban areas, with high population and building density, may experience higher casualties during earthquakes but often benefit from better seismic codes and rescue capabilities. Rural areas, while less densely populated, typically have poorer building quality and seismic resistance, coupled with limited rescue resources, potentially leading to higher fatality rates. Based on this, this paper collected data on 42 earthquake events with significant casualties that occurred in China from 1970 to 2025. These earthquake samples include key parameters such as occurrence time (\(x_{1}\)), magnitude (\(x_{2}\)), focal depth (\(x_{3}\)), epicentral intensity (\(x_{4}\)), fortification intensity (\(x_{5}\)), the difference between epicentral and fortification intensity (\(\beta\)) (\(x_{6}\)), population density (\(x_{7}\)) (people\(\cdot\)km\({}^{-2}\)), building codes (\(x_{8}\)), topography (\(x_{9}\)), building quality (\(x_{10}\)), and urban-rural classification (\(x_{11}\)).