优化6个类,现在ks降低到0.28,史称3.0版本

This commit is contained in:
2026-01-28 20:10:42 +08:00
parent 59697c0640
commit 39eede92f6
28 changed files with 3317 additions and 225 deletions

View File

@@ -121,6 +121,12 @@ Based on HAI feature semantics and observed KS outliers, we classify problematic
Examples: P2_24Vdc, P2_HILout
Strategy: AR/ARMA or regimeconditioned narrow-band models.
### 4.4 Module Boundaries / 模块边界
- **Program generator** outputs Type1 variables (setpoints/demands).
- **Controller/actuator modules** output Type2/3 variables conditioned on Type1.
- **Diffusion** generates remaining continuous PVs + discrete features.
- **Postprocessing** reconstructs Type5 derived tags and applies calibration.
---
## 5. Diffusion Formulations / 扩散形式
@@ -233,8 +239,40 @@ Metrics (with reference):
- 输出 `example/results/filtered_metrics.json`
- 只用于诊断,不作为最终指标
**Ranked KS特征贡献排序** `example/ranked_ks.py`
- 输出 `example/results/ranked_ks.csv`
- 计算每个特征对 avg_ks 的贡献,以及“移除前 N 个特征后”的 avg_ks
**Program statssetpoint/demand 统计):** `example/program_stats.py`
- 输出 `example/results/program_stats.json`
- 指标change-count / dwell / step-size对比生成 vs 真实)
**Controller statsType2 控制量):** `example/controller_stats.py`
- 输出 `example/results/controller_stats.json`
- 指标:饱和比例 / 变化率 / 步长中位数
**Actuator statsType3 执行器):** `example/actuator_stats.py`
- 输出 `example/results/actuator_stats.json`
- 指标:峰值占比 / unique ratio / dwell
**PV statsType4 传感器):** `example/pv_stats.py`
- 输出 `example/results/pv_stats.json`
- 指标q05/q50/q95 + tail ratio
**Aux statsType6 辅助量):** `example/aux_stats.py`
- 输出 `example/results/aux_stats.json`
- 指标:均值/方差/lag1
**Type-based postprocess:** `example/postprocess_types.py`
- 输出 `example/results/generated_post.csv`
- 用 Type1/2/3/5/6 规则重建部分列(无需训练)
- KS-only baseline: Type1/2/3/5/6 经验重采样(只为压 KS可能破坏联合分布
**Evaluation protocol:** see `docs/evaluation.md`.
Recent runs (Windows):
- 2026-01-27 21:22:34 — avg_ks 0.4046 / avg_jsd 0.0376 / avg_lag1_diff 0.1449
Recent runs (WSL, diagnostic):
- 2026-01-28 — KS-only postprocess baseline (full-reference, tie-aware KS): overall_avg_ks 0.2851
---
@@ -252,6 +290,7 @@ Recent runs (Windows):
- Positional + time embeddings for stability
- Optional inverse-variance weighting for continuous loss
- Log1p transforms for heavy-tailed signals
- Quantile transform + post-hoc calibration to stabilize CDF alignment
---
@@ -264,6 +303,7 @@ Recent runs (Windows):
- Sampling: `example/sample.py`
- Export: `example/export_samples.py`
- Evaluation: `example/evaluate_generated.py`
- KS uses tie-aware implementation and aggregates all reference files matched by glob.
- Pipeline: `example/run_all.py`
- Config: `example/config.json`
@@ -274,6 +314,7 @@ Recent runs (Windows):
- Lag1 may fluctuate → distribution vs temporal trade-off
- Discrete JSD can regress when continuous KS is prioritized
- Transformer backbone may change stability; needs systematic comparison
- Program/actuator features require specialized modeling beyond diffusion
---
@@ -282,6 +323,12 @@ Recent runs (Windows):
- Explore **vprediction** for continuous branch
- Strengthen discrete diffusion (e.g., D3PM-style transitions)
- Add targeted discrete calibration for highJSD columns
- Implement program generator for Type1 features and evaluate with dwell/step metrics
## 16. Deliverables / 交付清单
- Code: diffusion + temporal + diagnostics + pipeline scripts
- Docs: report + decisions + experiments + architecture + evaluation protocol
- Results: full metrics, filtered metrics, ranked KS, perfeature CDFs
---