Address tech debt from code reviews (PRs #115-#159)#165
Conversation
- Add bootstrap_weights parameter to TwoStageDiD and ImputationDiD (rademacher/mammen/webb, matching CallawaySantAnna API) - Unify TwoStageDiD GMM score computation via _compute_gmm_scores() static method with consistent NaN/overflow handling - Extract _compute_target_weights() helper for ImputationDiD weight construction, eliminating aggregation/bootstrap duplication - Optimize TwoStageDiD cluster score loop: single .toarray() call replaces per-column .getcol(j).toarray() - Add TROP n_bootstrap >= 2 validation (ValueError) - Remove SunAbraham deprecated min_pre_periods/min_post_periods params - Remove legacy compute_placebo_effects from utils.py - Add ImputationDiD bootstrap + covariate test - Update TODO.md marking completed items Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Overall assessment: Executive Summary
Methodology
Code Quality Performance
Maintainability Tech Debt Security Documentation/Tests
|
Address 5 AI review items: update Methodology Registry for bootstrap_weights and SunAbraham param removal, fix bootstrap result docstrings, add memory guidance for dense .toarray(), and document n_bootstrap minimum. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Executive summary:
Methodology Code Quality Performance
Maintainability Tech Debt Security Documentation/Tests
|
…round 2 - Add _SPARSE_DENSE_THRESHOLD in two_stage.py with per-column .tocsc() fallback for large FE matrices; apply same pattern in bootstrap module - Remove min_pre_periods/min_post_periods from README SunAbraham table - Add test_removed_params_raise_typeerror for SunAbraham - Add test_sparse_fallback_path for TwoStageDiD dense/sparse equivalence Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Executive summary
Methodology Code Quality Performance Maintainability
Tech Debt Security Documentation/Tests
|
Duplicate _SPARSE_DENSE_THRESHOLD in two_stage_bootstrap.py to eliminate cross-import from two_stage.py. Add bootstrap_weights param to README ImputationDiD/TwoStageDiD constructors and n_bootstrap minimum note to TROP. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: ✅ Looks good Executive summary
Methodology Code Quality Performance Maintainability
Tech Debt Security Documentation/Tests
|
… for PR #165 round 4 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Executive summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
…update docstrings for PR #165 round 5 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: ✅ Looks good Executive Summary
Methodology Code Quality Performance Maintainability
Tech Debt Security Documentation/Tests |
Summary
bootstrap_weightsparameter to TwoStageDiD and ImputationDiD (rademacher/mammen/webb, matching CallawaySantAnna API)_compute_gmm_scores()static method with consistent NaN/overflow handling_compute_target_weights()helper for ImputationDiD, eliminating aggregation/bootstrap weight duplication.toarray()replaces per-column.getcol(j).toarray()n_bootstrap >= 2validation (ValueError)min_pre_periods/min_post_periodsparamscompute_placebo_effectsfromutils.pyMethodology references (required if estimator / math changes)
Validation
tests/test_two_stage.py,tests/test_imputation.py,tests/test_trop.py,tests/test_sun_abraham.py,tests/test_utils.pySecurity / privacy
Generated with Claude Code