Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[New refutation] Add OverRule for learning Boolean rules to describe …
…support/overlap (#791) * feat: Add scaffolding for overrule, including basic test Signed-off-by: Michael Oberst <[email protected]> * feat: Update dependencies for overrule Signed-off-by: Michael Oberst <[email protected]> * feat: Add the full set of overrule code Signed-off-by: Michael Oberst <[email protected]> * style: Black styling on overrule code style: Black formatting on beam_search style: Black formatting for ruleset style: Black format utils style: Black formatting on load_process_data_BCS Signed-off-by: Michael Oberst <[email protected]> * fix: Change np.matmul to np.dot Signed-off-by: Michael Oberst <[email protected]> * fix: Update to appropriate matmul notation for latest CVXPY Signed-off-by: Michael Oberst <[email protected]> * feat: Remove unnecessary overrule code Signed-off-by: Michael Oberst <[email protected]> * feat: Minimum working example for OverRule Signed-off-by: Michael Oberst <[email protected]> * test: Minimum viable test for OverRule test: Fix test to work with new interface Signed-off-by: Michael Oberst <[email protected]> * feat: Print rules with option to recompute metrics Signed-off-by: Michael Oberst <[email protected]> * feat: Improve printing of results for refutation Signed-off-by: Michael Oberst <[email protected]> * feat: Pass in additional arguments to OverRule Signed-off-by: Michael Oberst <[email protected]> * docs: Add docstrings to ruleset.py docs: Docstrings for assess_overlap.py Signed-off-by: Michael Oberst <[email protected]> * feat: Update logger Signed-off-by: Michael Oberst <[email protected]> * docs: Add additional docstrings Signed-off-by: Michael Oberst <[email protected]> * fix: Path bug Signed-off-by: Michael Oberst <[email protected]> * feat: Add notebook with a toy example to demonstrate OverRule Signed-off-by: Michael Oberst <[email protected]> * feat: Add back using LP coeff by default Signed-off-by: Michael Oberst <[email protected]> * docs: Typing and docstrings docs: Consistent module docstrings docs: Add docstrings to overrule/utils.py docs: Add docstrings to overrule/BCS/beam_search.py docs: Add doctstrings and typing to load_process_data_BCS docs: Add docstrings and type hints to BCS/overlap_boolean_rule.py Signed-off-by: Michael Oberst <[email protected]> * docs: Fix and rename notebook for demonstrating overrule Signed-off-by: Michael Oberst <[email protected]> * feat: Use default_rng instead of setting a global seed in sample_Unif Signed-off-by: Michael Oberst <[email protected]> * fix: Use rng in place of numpy.random Signed-off-by: Michael Oberst <[email protected]> * fix: Replace list with numpy array to fix type error Signed-off-by: Michael Oberst <[email protected]> * docs: Fix type hint on ref_range Signed-off-by: Michael Oberst <[email protected]> * feat: Add option to only fit overlap or support rules Signed-off-by: Michael Oberst <[email protected]> * docs: Flesh out example notebook with parameters Signed-off-by: Michael Oberst <[email protected]> * feat: Add thresh_override as a argument for configuration Signed-off-by: Michael Oberst <[email protected]> * feat: Functional API for overrule has defaults Signed-off-by: Michael Oberst <[email protected]> * docs: Add API reference Signed-off-by: Michael Oberst <[email protected]> * ci: Fix support rule test Signed-off-by: Michael Oberst <[email protected]> * chore: Update poetry.lock for cxvpy dependency Signed-off-by: Michael Oberst <[email protected]> * feat: Remove `XGBClassifier` as default classifier To avoid dependency on `xgboost`, replace `XGBClassifier` as the default propensity score model with `RandomForestClassifier` from `sklearn` Signed-off-by: Michael Oberst <[email protected]> * fix: Fix logic so that when verbose=True, silent=False Signed-off-by: Michael Oberst <[email protected]> * feat: Remove seaborn dependency from overrule notebook Signed-off-by: Michael Oberst <[email protected]> * feat: Add option to pass random seed to support estimation Signed-off-by: Michael Oberst <[email protected]> * docs: Update notebook to use random seed on support estimation Signed-off-by: Michael Oberst <[email protected]> * fix: Typo Signed-off-by: Michael Oberst <[email protected]> * feat: Add PSID dataset (observational controls for Lalonde) Signed-off-by: Michael Oberst <[email protected]> * fix: Prevent fitting overlap rules if all samples in overlap region One of the assertions in OverlapBooleanRule will trip if all samples are in the overlap region. This commit adds a more informative error if the assertion gets tripped, and raises a more informative warning upstream if all samples are in the overlap region Signed-off-by: Michael Oberst <[email protected]> * feat: Add function that can be used with target_units `refute.filter_dataframe(df)` can be used to filter a dataframe to units that are in the overlap/support region. Signed-off-by: Michael Oberst <[email protected]> * docs: Clarify notebook intro Signed-off-by: Michael Oberst <[email protected]> * feat: Clarify how to read rules in refuter output Signed-off-by: Michael Oberst <[email protected]> * fix: Return a copy when filtering Signed-off-by: Michael Oberst <[email protected]> * docs: Update notebook with Lalonde example Signed-off-by: Michael Oberst <[email protected]> * docs: Add return to docstring Signed-off-by: Michael Oberst <[email protected]> * docs: Add citation for pricing problem Signed-off-by: Michael Oberst <[email protected]> * feat: Change progressbar error to warning Signed-off-by: Michael Oberst <[email protected]> * chore: Update lockfile Signed-off-by: Michael Oberst <[email protected]> Signed-off-by: Michael Oberst <[email protected]>
- Loading branch information