You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: TODO.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Consolidation opportunities for cleaner maintenance:
26
26
| Duplicate Code | Locations | Notes |
27
27
|---------------|-----------|-------|
28
28
|~~Within-transformation logic~~|~~Multiple files~~| ✅ Extracted to `utils.py` as `demean_by_group()` and `within_transform()` (v2.0.1) |
29
-
| Linear regression helper |`staggered.py:205-240`, `estimators.py:366-408`| Consider consolidation|
29
+
|~~Linear regression helper~~|~~Multiple files~~| ✅ Added `LinearRegression` class in `linalg.py` (v2.1). Used by DifferenceInDifferences, TwoWayFixedEffects, SunAbraham, TripleDifference.|
30
30
31
31
### Large Module Files
32
32
@@ -65,7 +65,7 @@ Different estimators compute SEs differently. Consider unified interface.
65
65
66
66
## Documentation Improvements
67
67
68
-
-[ ]Comparison of estimator outputs on same data
68
+
-[x]~~Comparison of estimator outputs on same data~~ ✅ Done in `02_staggered_did.ipynb` (Section 13: Comparing CS and SA)
69
69
-[ ] Real-world data examples (currently synthetic only)
70
70
71
71
---
@@ -90,11 +90,12 @@ Enhancements for `honest_did.py`:
90
90
91
91
## Rust Backend Optimizations
92
92
93
-
Deferred from PR #58 code review (can be done post-merge):
93
+
Deferred from PR #58 code review (completed in v2.0.3):
94
94
95
-
-[ ]**Matrix inversion efficiency** (`rust/src/linalg.rs:180-194`): Use Cholesky factorization for symmetric positive-definite matrices instead of column-by-column solve
96
-
-[ ]**Reduce bootstrap allocations** (`rust/src/bootstrap.rs`): Currently uses `Vec<Vec<f64>>` → flatten → `Array2` which allocates twice. Should allocate directly into ndarray.
97
-
-[ ]**Consider static BLAS linking** (`rust/Cargo.toml`): Currently requires system BLAS libraries. Consider `openblas-static` or `intel-mkl-static` features for easier distribution.
95
+
-[x]**Matrix inversion efficiency** (`rust/src/linalg.rs`): ✅ Uses Cholesky factorization for symmetric positive-definite matrices with LU fallback for near-singular cases
96
+
-[x]**Reduce bootstrap allocations** (`rust/src/bootstrap.rs`): ✅ Direct Array2 allocation eliminates Vec<Vec<f64>> intermediate. Also added Rayon chunk size tuning and Webb lookup table optimization.
97
+
-[x]**Static BLAS linking options** (`rust/Cargo.toml`): ✅ Added `openblas-static` and `intel-mkl-static` features for easier distribution
98
+
-[x]**Vectorized variance computation** (`rust/src/linalg.rs`): ✅ HC1 meat and score computation now use BLAS-accelerated matrix operations instead of scalar loops
98
99
99
100
---
100
101
@@ -103,6 +104,6 @@ Deferred from PR #58 code review (can be done post-merge):
103
104
Potential future optimizations:
104
105
105
106
-[ ] JIT compilation for bootstrap loops (numba)
106
-
-[ ]Parallel bootstrap iterations
107
+
-[x]~~Parallel bootstrap iterations~~ ✅ Done via Rust backend (rayon) in v2.0
107
108
-[ ] Sparse matrix handling for large fixed effects
0 commit comments