Predict the level of damage to buildings caused by earthquakes.
Based on aspects of building location and construction, this project predicts the level of damage to buildings caused by the 2015 Gorkha earthquake in Nepal.
TODO
This project uses data provided by DrivenData. The data was collected through surveys by Kathmandu Living Labs and the Central Bureau of Statistics, which works under the National Planning Commission Secretariat of Nepal. This survey is one of the largest post-disaster datasets ever collected, containing valuable information on earthquake impacts, household conditions, and socio-economic-demographic statistics.
Here we some insights from our exploratory data analysis.
Class imbalance of the target
Damage grade and structure type
You can find more plots and visualizations in the folder graphics
Our team of data scientists from Data Science Retreat in Berlin developed a model to predict the level of damage to the buildings. We used a variety of machine learning models, including Logistic Regression, Gradient Boosting, XGBoost, and Neural Networks. We also used a variety of feature engineering techniques, including one-hot encoding, target encoding, frequency encoding, and feature scaling.
- Python
- Pandas
- Numpy
- Scikit-learn
- XGBoost
- Matplotlib
- Seaborn
We achieve a micro-averaged F1 score of 0.7406
- Sign up to DrivenData and join the Richter's Predictor competition: DrivenData
- Download the data files and save them to the
data
folder: Download data
- Navigate to your projects folder, e.g.
cd ~/projects
- Clone the repository:
git clone https://github.com/carecodeconnect/richters-predictor
- Navigate to the project folder:
cd richters-predictor
- Create a virtual environment:
conda create -n richters-predictor python=3.10
- Activate the virtual environment:
conda activate richters-predictor
- Install the required packages:
pip install -r requirements.txt
- Open the Jupyter Notebook:
jupyter notebook
- Open and run the notebook:
baseline.ipynb
- Open and run the best model:
best.py
- Deploy the app:
streamlit run app.py