Repository navigation
Add automatic source weighting for multisource estimation - #10
Open
Jodielidada wants to merge 2 commits into
Open
Jodielidada wants to merge 2 commits into
Jodielidada wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
==========================================
+ Coverage 99.18% 99.23% +0.05%
==========================================
Files 7 7
Lines 610 657 +47
==========================================
+ Hits 605 652 +47
Misses 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Jodielidada
marked this pull request as ready for review
November 16, 2026 23:39
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.
Multisource fitting currently uses equal weights when none are supplied. This change makes automatic source weighting the default in
learner(),dlearner()andcv.learner(), using the inverse subspace-distance rule in Equation (3) of McGrath et al. (2026). Numeric weights remain supported;"equal"or explicitNULLretains equal weighting.Implementation
1e-12stabilizer matching the paper repository's simulation helper.Choices for review
Automatic weighting is the new default when the argument is omitted. For an incomplete target, including CV training targets, a zero-filled target SVD supplies the pilot subspaces used for weighting. This is an extension of the complete-data formula; missing entries remain excluded from the fitting loss. The pilot may be sensitive to structured missingness. The default change and this missing-data treatment are the main decisions to review before merging.
Validation
Tests cover explicit-projector agreement, coincident and orthogonal spaces, full rank, manual/equal modes, and independent fold-by-fold CV predictions. A held-out-value perturbation test verifies that validation values do not affect their fold's weights. Existing single-source and fixed-weight numerical regressions remain covered.
The implementation passed the full local test suite and
R CMD check --no-manualwith the rendered vignette in the development checkout. The full test suite also passed on this branch against the latestmain. Local OpenMP support is unavailable, so true multithreaded execution remains for CI to exercise.