Skip to content

Build canonical v2 Lift specs in Python - #379

Merged
uriahf merged 3 commits into
mainfrom
canonical-lift-v2-spec-5323620091527145700
Aug 23, 2026
Merged

Build canonical v2 Lift specs in Python#379
uriahf merged 3 commits into
mainfrom
canonical-lift-v2-spec-5323620091527145700

Conversation

@uriahf

@uriahf uriahf commented Aug 23, 2026

Copy link
Copy Markdown
Owner

This PR implements canonical static and time-dependent Lift v2 production adoption in Python.

Key additions:

  • _lift_v2_spec_from_performance_data and _lift_times_v2_spec_from_performance_data internal spec builders in src/rtichoke/_viz_spec_v2.py
  • Perfect Prediction path [(0, 1/p), (p, 1/p), (1, 1)] scoped to population (static) or population_horizon (time-dependent)
  • Random Guess horizontal line at value = 1 scoped globally
  • Matplotlib rendering support via _render_lift_v2 in src/rtichoke/_renderers.py
  • Updated create_lift_curve and create_lift_curve_times in src/rtichoke/discrimination/lift.py with renderer: str = "plotly" parameter, maintaining Plotly as the authoritative default and blocking browser rendering until a newer vendored rtichoke_viz release containing Lift support is cut
  • Comprehensive unit tests in tests/test_lift_v2.py and tests/test_time_lift_v2.py

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

Implement canonical static and time-dependent Lift v2 spec builders in Python.
Preserve statistical calculations, semantic evaluation metadata, Plotly production renderer,
and reference ownership for equal prevalence or event risk scenarios.

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 23, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-23 09:55 UTC

google-labs-jules Bot and others added 2 commits August 23, 2026 09:49
Remove unused imports from tests/test_lift_v2.py and tests/test_time_lift_v2.py to satisfy ruff linting.

Co-authored-by: uriahf <11351434+uriahf@users.noreply.github.com>
Run `ruff format .` to format tests/test_lift_v2.py and pass ruff format CI check.

Co-authored-by: uriahf <11351434+uriahf@users.noreply.github.com>
@uriahf
uriahf merged commit 94d46e0 into main Aug 23, 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