Add return_members option to CommitteeRegressor.predict()#532
Open
hmacdope wants to merge 2 commits into
Open
Conversation
Adds return_members=False to _predict() and predict(). When True, the raw per-member predictions are returned as the last element of the tuple with shape (n_samples, n_tasks, n_members). Composes cleanly with return_std: callers can request any combination of mean, std, and member predictions. Closes #464 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@smcolby can you review here? |
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.
Closes #464
Summary
return_members=FalsetoCommitteeRegressor.predict()and_predict()True, the raw per-member predictions are appended to the return tuple with shape(n_samples, n_tasks, n_members)return_std— all four combinations are supported:predict(X)→meanpredict(X, return_std=True)→(mean, std)predict(X, return_members=True)→(mean, members)predict(X, return_std=True, return_members=True)→(mean, std, members)Test plan
test_return_membersunit test covers shape, consistency with mean/std, and the no-flag scalar return🤖 Generated with Claude Code