Skip to content

Add time-dependent prediction distribution data preparation - #430

Merged
uriahf merged 2 commits into
mainfrom
jules/internal-time-dependent-probs-distribution-data-contract-10490003742230139151
Oct 6, 2026
Merged

uriahf merged 2 commits into
mainfrom
jules/internal-time-dependent-probs-distribution-data-contract-10490003742230139151

Conversation

@uriahf

@uriahf uriahf commented Oct 6, 2026

Copy link
Copy Markdown
Owner

PR Description:

  • Starting main SHA: 34a7af2
  • Final head SHA: e5e828ff7b63f533a088554d3e5e2e8b2ec0df19 (local)
  • Exact files changed:
    • src/rtichoke/performance_data/probs_distribution.py
    • tests/test_probs_distribution_times.py
  • Summary of the new internal helper/data contract:
    Added _prepare_probs_distribution_data_times(...) in src/rtichoke/performance_data/probs_distribution.py returning _PredictionDistributionTimesData with keys:
    • bins: Raw probability-bin observation counts (n_observations, n_real_positive, n_real_negative, n_real_competing) conserving N without censoring/competing adjustments.
    • rank_bins: Raw probability-quantile rank-bin observation counts conserving N.
    • cutoff_region_aj: Exactly two rows per operating cutoff (predicted_positives and predicted_negatives), containing estimated AJ state masses (real_positives_est, real_negatives_est, real_competing_est, real_censored_est) and derived confusion matrix counts (true_positives, false_positives, true_negatives, false_negatives).
    • operating_points: One row per operating cutoff with performance metrics matching existing time-dependent performance output.
  • Confirmation that existing AJ/statistical internals were reused unchanged: Confirmed.
  • Confirmation that probability-threshold semantics are unchanged: Confirmed (cutoff 0 puts all in predicted_positives; cutoff > 0 strictly applies probability > cutoff).
  • Confirmation that PPCR semantics are unchanged: Confirmed.
  • Confirmation that raw histogram counts conserve N and remain raw: Confirmed.
  • Confirmation that cutoff-region AJ masses reproduce existing PPV/NPV/sensitivity/specificity: Confirmed.
  • Validation commands and results:
    • uv run ruff check . passed.
    • uv run ruff format --check . passed.
    • uv run ty check src/rtichoke passed.
    • uv run pytest passed (412 passed, 12 skipped).
  • Confirmation that package version, vendored rtichoke_viz assets, and release artifacts are unchanged: Confirmed.

PR created automatically by Jules for task 10490003742230139151 started by @uriahf

Implement `_prepare_probs_distribution_data_times` in
`src/rtichoke/performance_data/probs_distribution.py` to prepare
raw prediction histogram data and cutoff-region Aalen-Johansen (AJ)
operating summaries. Add focused unit tests in
`tests/test_probs_distribution_times.py`.

Co-authored-by: uriahf <11351434+uriahf@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-06 13:57 UTC

Implement `_prepare_probs_distribution_data_times` in
`src/rtichoke/performance_data/probs_distribution.py` to prepare
raw prediction histogram data and cutoff-region Aalen-Johansen (AJ)
operating summaries. Add focused unit tests in
`tests/test_probs_distribution_times.py`.

Co-authored-by: uriahf <11351434+uriahf@users.noreply.github.com>
@uriahf
uriahf merged commit 46c48d0 into main Oct 6, 2026
6 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