Repository navigation
Retain raw propensity scores in DoubleMLIRM - #405
Merged
SvenKlaassen merged 2 commits intoSep 20, 2026
Merged
Conversation
Member
|
Hi @leninworld, thank you that looks fine. One small comment. |
Contributor
Author
Done. Thanks @SvenKlaassen |
SvenKlaassen
approved these changes
Sep 20, 2026
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 #258.
Description
This adds a read-only
raw_propensityproperty toDoubleMLIRM. Whenfit(store_predictions=True)is used, raw cross-fitted propensity predictions are copied into a dedicated array before the configured propensity-score processor clips or normalizes them. Whenstore_predictions=False,raw_propensityremainsNone, matching the storage setting requested in the review feedback.The implementation covers both internally estimated and externally supplied propensity predictions, resets state on repeated fits, returns a copy so callers cannot mutate fitted state, and documents the
(n_obs, n_rep, n_coefs)shape. Existing prediction-key invariants and fit results remain unchanged.Reference to Issues or PRs
This is the prerequisite portion of #258. It exposes the raw scores needed by a later log-odds overlap diagnostic without adding that diagnostic in this PR.
Related to #258.
Validation
b69f86ef7bdb50d3f9e94fbaf40f18ce050f13d2: affected propensity, external-prediction, and return-type tests — 79 passed, 20 warningsgit diff --checkon the exact P3 head — passedrdrobustdependency, and 15 other failures occurred outside the changed IRM files. This run is not counted as passing validation.Validation evidence
The screenshot below records the initial P2 validation at head
42c37b6. It is retained as historical evidence; the current P3/I2 exact-head validation is reported above.Scope
No log-odds diagnostic is included here. No existing prediction keys, estimator outputs, or serialization contracts are changed.
PR Checklist