Skip to content

Adopt time-dependent Precision-Recall browser rendering - #397

Merged
uriahf merged 1 commit into
mainfrom
jules-15927789404890825170-23ef6b80
Aug 26, 2026
Merged

Adopt time-dependent Precision-Recall browser rendering#397
uriahf merged 1 commit into
mainfrom
jules-15927789404890825170-23ef6b80

Conversation

@uriahf

@uriahf uriahf commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Extend existing PrecisionRecallV2 consumer architecture to support time-dependent Precision-Recall curves.

Summary of changes:

  1. src/rtichoke/_viz_spec_v2.py:
    • Implement _precision_recall_times_v2_spec_from_performance_data to construct canonical v2 specs from time-dependent performance data.
    • Maintain stable evaluation IDs across horizons and assign unique series IDs per evaluation × horizon.
    • Construct population_horizon prevalence reference lines using cutoff-0 AJ event-risk.
  2. src/rtichoke/discrimination/precision_recall.py:
    • Add parameter renderer: str = "plotly" to create_precision_recall_curve_times().
    • Preserve default Plotly behavior while supporting "browser" and "rtichoke_viz" renderers. Raise ValueError for "matplotlib".
  3. tests/test_time_precision_recall_v2.py:
    • Add unit and browser acceptance tests for time-dependent Precision-Recall specifications, equality-preservation across equal risk populations, renderer dispatch, and horizon selection/switching in headless Chrome.

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

Add browser opt-in (`renderer="browser"` and `renderer="rtichoke_viz"`) to
`create_precision_recall_curve_times()`. Construct canonical
`PrecisionRecallV2Spec` specifications from time-dependent performance data,
preserving existing Plotly defaults and statistical calculations.

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 Aug 26, 2026

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

@uriahf
uriahf merged commit 6a12418 into main Aug 26, 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