Skip to content

fix: split_y_true slices exactly one treatment column (v0.1.3) - #23

Merged
gmgeorg merged 1 commit into
mainfrom
fix/split-y-true-exact-treatment-col
Aug 23, 2026
Merged

gmgeorg merged 1 commit into
mainfrom
fix/split-y-true-exact-treatment-col

Conversation

@gmgeorg

@gmgeorg gmgeorg commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • split_y_true (pypsps/utils.py) sliced treatment_true as "all remaining columns after outcome" instead of exactly one column. Every committed loss/model has a single treatment column, so this was correct by accident — a y_true with extra trailing columns would silently fold into treatment_true with no error.
  • Fixed to slice exactly [n_outcome_true_cols : n_outcome_true_cols + 1].
  • Bumped version to 0.1.3 and added CHANGELOG entry.

Test plan

  • pytest pypsps/tests/test_utils.py pypsps/tests/test_losses.py pypsps/tests/test_metrics.py — 26 passed
  • Full suite: pytest pypsps/tests — 84 passed, 3 skipped

🤖 Generated with Claude Code

https://claude.ai/code/session_01SdCb8CoUX1aJbyHVgM5cF5

y_true[:, n_outcome_true_cols:] took all remaining columns for
treatment_true instead of exactly one. Every committed loss/model has
a single treatment column so this was correct by accident; a y_true
with extra trailing columns (e.g. downstream survival/auxiliary
columns) would silently fold into treatment_true with no error.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdCb8CoUX1aJbyHVgM5cF5
@gmgeorg
gmgeorg merged commit 1a80698 into main Aug 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant