Changelog
0.1.14 (2026-05-15)
New features
Rich result objects. Every
solver.fit()call now returns a fully self-contained result object.result.Oandresult.Zare attached automatically, enabling all diagnostics without re-running the model.New computed properties:
residuals,effect_matrix,z_pattern,untreated_r2,control_rmse,pre_exposure_rmse,rmspe_ratio.``result.summary()`` prints a formatted table covering panel info, ATT estimate (with SE when available), fit diagnostics, and estimator-specific model internals (weights, rank, fixed effects, factor matrix shape). Returns
selffor method chaining.``result.plot_actual_vs_counterfactual(unit)`` renders an interactive Plotly chart — actual vs. counterfactual with green treatment-period shading, T0 marker, and a unit-level annotation box.
Estimator-specific result attributes (all new, accessed directly on the returned object):
DID / SDID / MC-NNM:
row_fixed_effects,column_fixed_effectsSDID:
unit_weights(donor simplex weights),time_weightsMC-NNM:
M(low-rank component separate from fixed effects),betaDC-PR:
std/std_tau(sandwich SE),inference_methodOLS SC:
beta(per-unit donor weight vectors),individual_te,control_units,treatment_unitsCovPCA:
U(left factor matrix, N × r)
Large recommendation / retail panels enabled.
load_datasetnow accepts two keyword arguments forwarded to the four large-panel loaders (retailrocket,dunnhumby,truus,movielens):n_units(default 2500) — retain only the top-N items by event count.time_freq('W'/'M'/'D', default weekly) — aggregate raw daily data before pivoting, controlling panel width.
Tutorial Guide 04 (
tutorials/guides/04_inspecting_results.ipynb) — end-to-end walkthrough of the result object API using synthetic data with a known ground-truth ATT.
Performance improvements
SDID: Replaced
np.eye(N) @ w >= 0/np.ones(N).T @ w == 1constraint matrices with native CVXPYw >= 0/cp.sum(w) == 1forms; solver pinned toCLARABELfor faster, more reliable convergence.OLS SC: Inner donor-weight optimisation replaced with a
CLARABEL-based QP (cvxpy), dropping thesklearndependency. The outer predictor-importance loop retainsfmin_slsqpas it operates in a low-dimensional covariate space.RSC: Per-treated-unit projection vectorised — pseudoinverse of the pre-period donor matrix is computed once and applied to all treated rows in a single matrix multiply instead of a Python loop.
Documentation
docs/api.rstextended with a “Result Objects” section: common-attribute table and per-estimator attribute reference with quick-access code examples.fit()docstrings for SDID, MC-NNM, and OLS SC updated with completeReturnssections.Cross-reference from Guide 01 to Guide 04 added.
0.1.13 (2026-05-12)
Breaking changes
Solver constructor API changed. All seven
PanelSolverclasses now require(O, Z)at construction time and expose a singlefit()method. The old pattern of constructing a solver with no arguments and callingsolve_with_cross_validation/solve_with_suggested_rankis removed. Migration:# Before solver = DCPanelSolver() res = solver.solve_with_suggested_rank(O, Z, suggest_r=3) # After res = DCPanelSolver(O, Z).fit(suggest_r=3)
``MC_NNM`` cross-validation is now an argument to ``fit()``. Pass
cross_validation=True(default) instead of calling the oldsolve_with_cross_validationentry-point.``causaltensor.matlib.util`` removed. All linear-algebra helpers (
SVD,SVD_soft,transform_to_3D, etc.) have moved tocausaltensor.utils.linalg. Update any direct imports:# Before from causaltensor.matlib.util import SVD_soft # After from causaltensor.utils.linalg import SVD_soft
``causaltensor.matlib.generation`` and ``causaltensor.matlib.generation_treatment_pattern`` removed. Use the replacement modules instead:
generate_low_rank_M,add_noise→causaltensor.synthetic.utilsZ_iid,Z_block,Z_stagger,Z_adaptive→causaltensor.utils.treatment_patterns
New features
Three tutorial notebooks: real observed panels, synthetic DGP study, semi-synthetic benchmarks.
Sphinx API documentation with full NumPy-style docstrings for all solvers,
PanelDataset,generate,run_experiment, andrun_aa_test.causaltensor.utils.linalg— consolidated linear-algebra utilities with seededrng=API.
0.1.12 (2025-03-12)
Added CVXPY package for SDID method
0.1.11 (2025-03-12)
Fix a bug in the DC method: suggest_r was ignored due to the priority of auto_rank and now it will be prioritized over auto_rank
0.1.10 (2025-02-08)
Added Covariate support for SDID method
0.1.9 (2025-02-07)
Added Panel Solver Interface
Added more test cases
Added covariate support for synthetic control
0.1.8 (2023-11-05)
Enhanced MC-NNM functionality with covariate integration and improved handling of missing data.
0.1.7 (2023-08-24)
Introduced support for synthetic control methodology.
0.1.5 (2023-05-16)
Expanded capabilities to address multiple-treatment problems using panel regression methods with debiasing features.