Modeling Protective Action Decision-Making in Earthquakes by Using Explainable Machine Learning and Video Data
Manuscript submitted to Natural Scientific Reports
Implemented by Xiaojian Zhang, Department of Civil and Coastal Engineering, University of Florida
Please cite our study in the following format:
Video annotation: ELAN (European Distributed Corpora Project [EUDICO] Linguistic Annotator)
Annotation recoding: Python 3.9.16
Modeling: Python 3.9.16
Data preprocessing: pandas
Machine learning model development: xgboost, scikit-learn
Plots: seaborn, matplotlib
The training and testing datasets have the same data structure as detailed below:
- Each row is an observation and each column is a variable
- There are 14 variables (i.e., 14 columns) in total. Please refer to the paper for more details
A simulated dataset with 5 observations (i.e., demo.csv) is provided as an example dataset to guide readers the data structure.
For any questions regarding the dataset, please contact xiaojianzhang@ufl.edu
The code scripts for processing the annotation, modeling development and interpretations are uploaded. If you want to open them in your local environment, please make sure Jupyter Notebook is installed.
Preprocessing_Data.ipynb: preprocessing data, transforming annotations into numeric variables
Modeling_Plotting.ipynb: Train-test data splitting, machine learning model development, MNL model development, performance comparison, variable importance calculation, partial dependence plots generation, and all generating all figures.
An example of using ELAN to annotate protective action behavior is shown in ELAN_demo.png. We cover the video playing box for privacy issues. As we discussed in the paper, for each video, around three (one leader and two followers) decision-makers' behavior were annotated. The behavior, environment changes, and social interactions were identified per second.
Any use of trade, firm, or product names is for descriptive purposes only and does not imply endorsement by the U.S. Government.