Skip to content

remove: DATE decomposition and retrospective mode#30

Merged
YuminosukeSato merged 1 commit into
mainfrom
remove/date-decomposition-retrospective
Mar 26, 2026
Merged

remove: DATE decomposition and retrospective mode#30
YuminosukeSato merged 1 commit into
mainfrom
remove/date-decomposition-retrospective

Conversation

@YuminosukeSato
Copy link
Copy Markdown
Owner

Summary

  • DATE decomposition (ci.decompose(), DateDecomposition, EffectComponent) を完全削除
  • Retrospective mode (mode="retrospective") を完全削除
  • 線形Trend basisのseasonal patternとのconfoundリスク、論文の理論保証がライブラリ実装に直接適用されない問題を受け、警告追加ではなく機能ごと削除

Changes

  • decomposition.py, retrospective.py およびテスト2ファイルを丸ごと削除(-1650行)
  • main.py: mode引数、_decomposition_run_retrospective()decompose() 削除
  • plot.py: "decomposition" metric、_plot_decomposition() 削除
  • __init__.py: DateDecomposition, EffectComponent のexport削除
  • test_horseshoe.py: retrospective mode テスト削除
  • test_options.py, test_rust_sampler.py: コメント/テスト値更新
  • docs全面更新: api.md, theory.md, examples.md, compatibility-matrix.md, README.md, CHANGELOG.md

Breaking Changes

  • ci.decompose()AttributeError になる
  • mode="retrospective"ValueError: Unknown model_args keys: ['mode'] になる
  • from causal_impact import DateDecompositionImportError になる

Test plan

  • 375 tests pass, 0 regressions (pytest tests/ -v)
  • from causal_impact import CausalImpact, ModelOptions → OK
  • from causal_impact import DateDecompositionImportError
  • mode="retrospective"ValueError
  • 残存参照なし(grep確認済み)

The linear trend basis in DATE decomposition poses confounding risk
with seasonal patterns, and the retrospective mode's treatment
indicator approach lacks the theoretical guarantees of the original
paper when applied through this library's implementation.

Removed rather than warned to prevent misinterpretation of results.

- Delete decomposition.py, retrospective.py and their tests
- Remove decompose() method, mode parameter, _decomposition state
- Remove "decomposition" plot metric and _plot_decomposition()
- Remove DateDecomposition/EffectComponent from public API
- Update all docs (api.md, theory.md, examples.md, README.md, etc.)
- 375 tests pass, 0 regressions
@YuminosukeSato YuminosukeSato merged commit c78c168 into main Mar 26, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant