-
Notifications
You must be signed in to change notification settings - Fork 99
Integrate clusters into the DoubleMLData class, Refactor data generators, refactor sampling using Mixin Class
#338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
SvenKlaassen
merged 42 commits into
main
from
305-feature-request-integrate-clusters-into-the-doublemldata-class
Oct 7, 2025
Merged
Integrate clusters into the DoubleMLData class, Refactor data generators, refactor sampling using Mixin Class
#338
SvenKlaassen
merged 42 commits into
main
from
305-feature-request-integrate-clusters-into-the-doublemldata-class
Oct 7, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
… with implicit (fall through) returns Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
…the-doublemldata-class
SvenKlaassen
approved these changes
Sep 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need the input argument is_cluster_data?
I think this can be infered via cluster_cols
Remove is_cluster_data parameter from DoubleMLData.init() and from_arrays() Automatically set _is_cluster_data in cluster_cols setter based on whether cluster_cols is not None Remove is_cluster_data setter to make property read-only and inferred Update dataset generators, tests, and backwards compatibility classes to remove explicit is_cluster_data=True arguments Maintain compatibility by keeping is_cluster_data property for existing code Fixes test collection errors by eliminating unused parameter
…leMLAPOS` classes.
DoubleMLData class, Refactor data generatorsDoubleMLData class, Refactor data generators, refactor sampling using Mixin Class
SvenKlaassen
approved these changes
Oct 2, 2025
This was referenced Oct 7, 2025
This was
linked to
issues
Oct 16, 2025
Draft
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces updates to the
doublemllibrary, focusing on refactoring the support for cluster data, improving modularity, and deprecating unused features. Key changes include the addition of cluster-related functionality, deprecation of time (t_col) and score/selection (s_col) variables, and updates to documentation and examples to reflect these changes.Refactoring for Cluster Data:
cluster_cols) in theDoubleMLDataclass, including a newis_cluster_dataflag to indicate cluster data usage._set_cluster_varsandcluster_vars.DoubleMLClusterDataclass, replacing it withDoubleMLDatausingis_cluster_data=True. Warnings are added to inform users about the planned removal in version 0.12.0.Refactoring for Model Specific Data Backends:
t_col(time variable) ands_col(score/selection variable) fromDoubleMLDataand related methods, as they are no longer relevant except for the data backends used in e.g.DoubleMLDIDorDoubleMLSSM_data_summary_strmethod and other internal logic to exclude references to these deprecated variables.Refactoring Sampling Procedure using Mixin Class:
draw_sample_splittingandset_sample_splittingmethods from all model / child classes.SampleSplittingMixinsClass having both methods._initialize_dml_modelmethods forDoubleML,DoubleMLQTEandDoubleMLAPOs.Codebase Modularity:
__init__.pyfiles to include new data classes (DoubleMLDIDData,DoubleMLPanelData,DoubleMLRDDData,DoubleMLSSMData) and removed unused imports.cluster_colslogic.Refactoring of Data Generators / Fetch Methods
Documentation and Examples:
doubleml.plm.datasetsdgp path.PR Checklist