Add propensity clipping diagnostics to DRTester - #1063
Open
leninworld wants to merge 1 commit into
Open
leninworld wants to merge 1 commit into
leninworld wants to merge 1 commit into
Conversation
Signed-off-by: lenin <lenin.world@gmail.com>
leninworld
force-pushed
the
feat-propensity-clipping-diagnostics-issue-1054
branch
from
September 20, 2026 07:17
7696d40 to
ac02f06
Compare
This branch has not been deployed
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
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.
This PR fixes issue #1054.
Summary
calculate_dr_outcomesandDRTesterCloses #1054.
Validation
python -m pytest econml/tests/test_validate_utils.py econml/tests/test_drtester.py -q -o addopts='' -p no:cacheprovider— 11 passed, 6 subtests passedgit diff --check— passedValidation evidence
Compatibility and scope
The default threshold remains
0.01, and default arithmetic is unchanged when no clipping occurs. The new warnings distinguish clipping that affects an assigned treatment denominator from low propensity values on unassigned rows.This PR intentionally does not implement trimming because trimming changes the analyzed sample and can change the estimand. Upper clipping and propensity calibration are also out of scope.
The validation now raises explicit
ValueErrorexceptions for non-finite inputs and for data without control treatment 0 instead of allowing invalid doubly robust output.