feat(data): parse 3-agency PDF transition matrices to CSV #task-290

- New: data/parse_pdf_matrices.py (KR/NICE/SCI PDF parser)
  - KR: text-based parser (space-separated numbers + dashes)
  - NICE: text-based parser (clean numeric format)
  - SCI: pdfplumber table extraction (column-position-aware)
  - WR redistribution, B이하→B mapping, CCC extrapolation from PD patterns
- Modified: data/transition_matrices.py (added source='real' loader)
- Modified: config.yaml (data.transition_source: 'real')
- Modified: main.py (reads transition source from config)
- Output: 112 CSV files (KR/NICE/SCI/AVG × 28 years)
This commit is contained in:
Variet Agent
2026-03-11 01:07:27 +09:00
parent ebdc6b805b
commit 8af743e6f3
116 changed files with 1714 additions and 3 deletions

9
data/real/KR_2023.csv Normal file
View File

@@ -0,0 +1,9 @@
,AAA,AA,A,BBB,BB,B,CCC,D
AAA,0.985975,0.014025,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000
AA,0.024314,0.929246,0.044250,0.001037,0.000576,0.000576,0.000000,0.000000
A,0.000000,0.140393,0.803316,0.043990,0.002942,0.006418,0.000000,0.002942
BBB,0.000000,0.000972,0.210919,0.684066,0.045845,0.034301,0.003000,0.020897
BB,0.000000,0.000000,0.023439,0.179363,0.441274,0.137580,0.015287,0.203057
B,0.000000,0.000000,0.000000,0.029265,0.014633,0.366781,0.064726,0.524595
CCC,0.000000,0.000000,0.001000,0.002000,0.003000,0.011706,0.195401,0.786893
D,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000
1 AAA AA A BBB BB B CCC D
2 AAA 0.985975 0.014025 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
3 AA 0.024314 0.929246 0.044250 0.001037 0.000576 0.000576 0.000000 0.000000
4 A 0.000000 0.140393 0.803316 0.043990 0.002942 0.006418 0.000000 0.002942
5 BBB 0.000000 0.000972 0.210919 0.684066 0.045845 0.034301 0.003000 0.020897
6 BB 0.000000 0.000000 0.023439 0.179363 0.441274 0.137580 0.015287 0.203057
7 B 0.000000 0.000000 0.000000 0.029265 0.014633 0.366781 0.064726 0.524595
8 CCC 0.000000 0.000000 0.001000 0.002000 0.003000 0.011706 0.195401 0.786893
9 D 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1.000000