Skip to content

Match R cutoff equality semantics - #337

Merged
uriahf merged 11 commits into
mainfrom
fix/cutoff-boundary-semantics
Aug 20, 2026
Merged

Match R cutoff equality semantics#337
uriahf merged 11 commits into
mainfrom
fix/cutoff-boundary-semantics

Conversation

@uriahf

@uriahf uriahf commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • match R binary cutoff equality semantics: an observation with prob == cutoff is predicted negative because R uses prob > cutoff
  • preserve the time-dependent prob >= cutoff convention required for dcurves survival decision-curve parity
  • keep cutoff 0/1 endpoint behavior unchanged
  • verify the binary-only adjustment does not alter PPCR stratification

Implementation

Only binary data preparation is adjusted. Probabilities exactly equal to a nonzero public cutoff are moved one representable float downward for internal bin assignment; public probabilities/cutoffs and all non-boundary values are unchanged.

Evidence

The initial test-only commit failed both binary and time equality assertions. Existing dcurves parity coverage then showed that changing time semantics would be incorrect, so the final fix is binary-only.

Audit classification

  • Binary equality behavior: correctness bug versus R rtichoke
  • Time-dependent >= behavior: intentional methodological difference for dcurves parity

No statistical formulas, censoring heuristics, schemas, or dependencies are changed.

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-20 11:04 UTC

@uriahf
uriahf marked this pull request as ready for review August 20, 2026 11:04
@uriahf
uriahf merged commit 9b09ddf into main Aug 20, 2026
4 checks 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