liquefaction / README.md
Sompote's picture
Upload 9 files
fa1287c verified

A newer version of the Streamlit SDK is available: 1.49.1

Upgrade
metadata
title: Liquefaction Probability Calculator
emoji: 🌊
colorFrom: blue
colorTo: red
sdk: streamlit
sdk_version: 1.29.0
app_file: app.py
pinned: false

Liquefaction Probability Calculator

This Streamlit app calculates the probability of soil liquefaction based on SPT data, soil type data, and earthquake data using a deep learning model with SHAP explanations.

Model Architecture

The model uses a combination of:

  • Attention mechanisms for processing SPT and soil type data
  • FFT-based attention for earthquake data processing
  • Dense layers for combining features and making predictions

Input Data Format

The app expects an Excel file (.xlsx) with three sheets:

  1. 'SPT' - Contains Standard Penetration Test data (10 values)
  2. 'soil_type' - Contains soil type classification data (10 values)
  3. 'EQ_data' - Contains earthquake acceleration time series data (5000 values)

Required Columns

  • SPT sheet: SPT values, water table depth, epicentral distance, depth, distance to water, VS30
  • soil_type sheet: Soil type classification values
  • EQ_data sheet: Earthquake acceleration time series

How to Use

  1. Upload your Excel file using the file uploader
  2. Click "Calculate Liquefaction Probability"
  3. View the results:
    • Liquefaction probability for each sample
    • SHAP analysis explaining the predictions and feature importance

Results Interpretation

  • Probability values range from 0 to 1
  • Values closer to 1 indicate higher liquefaction probability
  • SHAP plots show how each feature contributes to the prediction:
    • Red bars indicate features increasing liquefaction probability
    • Blue bars indicate features decreasing liquefaction probability

Technical Details

  • Model: Deep learning model with attention mechanisms
  • Input features: SPT values, soil types, earthquake data, and site characteristics
  • Output: Binary classification (liquefaction probability)
  • Explanation: SHAP (SHapley Additive exPlanations) values

Dependencies

Main dependencies include:

  • streamlit==1.29.0
  • pandas==2.1.4
  • numpy==1.24.3
  • torch==2.1.2
  • matplotlib==3.8.2
  • shap==0.44.0
  • scikit-learn==1.3.2
  • openpyxl==3.1.2

See requirements.txt for the complete list of dependencies.