Skip to content

jinx2plus/Zero-InflatedModelforAccidentAnalysis

Repository files navigation

Zero-Inflated Model for Accident Analysis

졸음쉼터 설치 전/후 교통사고 건수 데이터를 대상으로 Zero-Inflated Negative Binomial(ZINB) 딥러닝 모델을 학습하고, Permutation Importance로 영향 변수를 분석한 프로젝트입니다.

공개용 정리 기준

  • 원본 데이터 파일(엑셀), 노트북 출력, 문서 초안(.docx), 압축본(.zip)은 기본적으로 Git 추적에서 제외합니다.
  • 실행 가능한 코드와 연구 결과 요약, 결과 CSV만 공개 대상으로 유지합니다.

폴더 구조

.
├─ train_model.py
├─ requirements.txt
├─ .env.example
├─ results/
│  ├─ feature_importance_VERSION1.csv
│  └─ feature_importance_VERSION2.csv
├─ docs/
│  └─ research_summary.md
├─ data/
│  └─ README.md
└─ .gitignore

실행 방법

  1. 학습 실행
python train_model.py --data-path "<your_excel_path>" --output-dir results

또는 .env.example을 참고하여 DATA_FILE 환경변수로 경로를 전달할 수 있습니다.

선택 옵션:

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

핵심 결과(요약)

  • Version1 상위 변수: 연속주행시간, 통행속도, 2시간 이상 주행차량 대수
  • Version2 상위 변수: 톨게이트(개수), 통행속도, 차로수
  • Is_After 중요도는 두 버전 모두 낮거나 음수로 나타나, 설치 전후 구분 변수 자체보다 도로/통행 특성 변수가 상대적으로 더 크게 작용했습니다.

자세한 내용은 docs/research_summary.md를 참고하세요.


English

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
├─ data/
│  └─ README.md
└─ .gitignore

How to Run

  1. Run training
python train_model.py --data-path "<your_excel_path>" --output-dir results

You can also provide the data path via 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: Continuous Driving Time, Travel Speed, Number of Vehicles Driving Over 2 Hours
  • Top variables in Version2: Toll Gates (Count), Travel Speed, Number of Lanes
  • 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.

About

for academic paper(December 2025 to Febuary 2026)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages