← Back to Pull requests

ENH: stats: add random variable infrastructure #110

Closed
unknown closed this pull request without merging on Jun 27, 2024 17:56 UTC
View on GitHub
unknown unknown commented on Sep 24, 2023 18:51 UTC
Author

@tupui rv_infrastructure is the branch you should base your Array API work on. However, I see that there is some work in rv_continuous that was intended to make it into SciPy already - all the stuff in _zeros.py and test_zeros.py. Here's what I'd suggest:

  • You can begin to work on _distribution_infrastructure.py and test_continuous.py from rv_continuous.

  • ~~Meanwhile, I'll submit a PR to SciPy main with the changes to _zeros.py and test_zeros.py. Sorry those didn't make it before you reviewed the bracketing PR; apparently I had refactored for clarity in this branch.~~ Done.

  • ~~After that merges, we'll rebase this branch on SciPy main. We'll also make sure to remove the duplicate hypothesis configuration.~~ Done.

  • You might need to merge rv_continuous into your Array API branch again because it will have changed, but there shouldn't be any difficult merge conflicts. You should just be able to use theirs for all files except the ones you've modified.
  • How does that sound?

    Diff: 127 lines (+95 / -32) across 1 files Reviewer: chrisb83 Review duration: 398825m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.55) × (1 − Review Confidence (0.58)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.55 · 127 lines diff across 1 files
    0.55
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    57%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.290
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.055
    Real PR Conversation Timeline
    1 comments
    "Review active on #110"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 58.0% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 55.2% (MEDIUM) · Higher = larger blast radius
    55.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 58.0% · Lower = rushed or shallow review
    58.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 23.2% · Safe to merge
    23.2%
    Repository