Skip to content

Latest commit

Β 

History

History
64 lines (53 loc) Β· 1.95 KB

File metadata and controls

64 lines (53 loc) Β· 1.95 KB

Zero-Inflated Model for Accident Analysis

This project trains a Zero-Inflated Negative Binomial (ZINB) deep learning model on traffic accident count data before and after drowsy rest area installation, and analyzes influential variables using permutation importance.

Public Release Scope

  • Raw data files (Excel), notebook outputs, draft documents (.docx), and archives (.zip) are excluded from Git tracking by default.
  • Only executable code, research summary documents, and curated result CSV files are included for public release.

Folder Structure

.
β”œβ”€ train_model.py
β”œβ”€ requirements.txt
β”œβ”€ .env.example
β”œβ”€ results/
β”‚  β”œβ”€ feature_importance_VERSION1.csv
β”‚  └─ feature_importance_VERSION2.csv
β”œβ”€ docs/
β”‚  β”œβ”€ research_summary.md
β”‚  └─ research_summary.en.md
β”œβ”€ data/
β”‚  β”œβ”€ README.md
β”‚  └─ README.en.md
└─ .gitignore

How to Run

  1. Install dependencies
pip install -r requirements.txt
  1. Run training
python train_model.py --data-path "<your_excel_path>" --output-dir results

You can also pass the path through the DATA_FILE environment variable (see .env.example).

Optional arguments:

  • --versions VERSION1 VERSION2
  • --epochs 500
  • --learning-rate 0.001

Key Results (Summary)

  • Top variables in Version1: μ—°μ†μ£Όν–‰μ‹œκ°„, 톡행속도, 2μ‹œκ°„ 이상 μ£Όν–‰μ°¨λŸ‰ λŒ€μˆ˜
  • Top variables in Version2: ν†¨κ²Œμ΄νŠΈ(개수), 톡행속도, 차둜수
  • Is_After importance is low or negative in both versions, suggesting road/traffic features contributed more strongly than the before/after indicator itself.

For details, see docs/research_summary.md and docs/research_summary.en.md.

Example: Upload to a Separate GitHub Repository

git init
git add .
git commit -m "Initial public release"

After connecting a remote repository:

git branch -M main
git remote add origin <your_repo_url>
git push -u origin main