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
Consolidate experiment design-matrix attributes into xr.Dataset (#849)
* Make _data_setter customizable via class attributes
Add _predictor_data_name and _target_data_name class attributes to
PyMCModel so subclasses using non-default data node names can
customize without re-implementing _data_setter. Validate at predict
time and raise a clear ValueError if expected nodes are missing.
Also fix pre-existing mypy type: ignore codes in panel_regression.py
(attr-defined -> union-attr).
Made-with: Cursor
* Simplify _data_setter: drop class attributes, keep validation
Remove _predictor_data_name / _target_data_name class attributes
(added complexity for a case no existing subclass needs). Keep the
validation that raises a clear ValueError when expected data nodes
are missing. Revert undeclared y_dtype behavioral change. Improve
test coverage with separate X-missing and y-missing error paths.
Made-with: Cursor
* Consolidate experiment design-matrix attributes into xr.Dataset
Bundle loose xr.DataArray attributes on experiment classes into
xr.Dataset objects to reduce attribute sprawl. Pre/post classes
(ITS, SC) use pre_design/post_design; formula-based classes use
a single design Dataset. Deprecated @Property accessors preserve
backward compatibility. Closes#199.
Made-with: Cursor
* Centralize deprecated design-alias boilerplate and fix internal callers
Move _build_design_dataset helper and __getattr__ deprecation forwarding
into BaseExperiment, replacing per-class @Property blocks with a
declarative _deprecated_design_aliases dict. Fix convex_hull.py and
maketables_adapters.py to use the new API directly. Add parametrized
backward-compatibility tests covering all deprecated aliases.
Made-with: Cursor
* Address review comments and migrate SDiD to design datasets
- Migrate SyntheticDifferenceInDifferences (added on main in #823) to the pre_design/post_design Dataset pattern with deprecated aliases, matching SyntheticControl, and extend the alias test suite to cover it.
- Normalize convex-hull call sites on xarray inputs and document that check_convex_hull_violation accepts numpy or xarray.
- Replace type: ignore escape hatches in ConvexHullCheck.run with an isinstance assertion that narrows the type for mypy.
- Point users at BayesianBasisExpansionTimeSeries in the _data_setter error message.
Co-authored-by: Cursor <cursoragent@cursor.com>
* Update UML diagrams after design-dataset consolidation
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments