← Back to Pull requests

Update performance related hyperparameters in Covariance and PCA #3787

Closed
unknown closed this pull request without merging on Oct 08, 2026 08:10 UTC
View on GitHub
unknown unknown commented on Sep 16, 2026 11:53 UTC
Author

Description

This PR updates propose_* methods in Covariance and PCA algorithms in order to improve the performance of those algorithms on CPU.

system_parameters structure was extended to provide get_l1_cache_size(), get_l2_cache_size() and get_ll_cache_size() methods in order to define the certain hyperparameters values based on the hardware characteristics.

Speedups of this branch comparing to main on GNR (Intel Xeon 6787P), 16 cores.
Measured with scikit-learn_bench

<img width="550" height="731" alt="image" src="https://github.com/user-attachments/assets/574a35cd-31c7-4afd-808f-85a2d685417f" />

Performance of the previous variant with the closed-form solution for cpu_block_size:

<img width="547" height="729" alt="image" src="https://github.com/user-attachments/assets/55a2b39e-6c33-4c38-82e1-b758e2bd171a" />

<details>
<summary>Checklist:</summary>

Completeness and readability

  • I have commented my code, particularly in hard-to-understand areas.

  • I have updated the documentation to reflect the changes or created a separate PR with updates and provided its number in the description, if necessary.

  • Git commit message contains an appropriate signed-off-by string _(see CONTRIBUTING.md for details)_.

  • I have resolved any merge conflicts that might occur with the base branch.
  • Testing

  • I have run it locally and tested the changes extensively.

  • All CI jobs are green or I have provided justification why they aren't.

  • I have extended testing suite if new functionality was introduced in this PR.
  • Performance

  • I have measured performance for affected algorithms using scikit-learn_bench and provided at least a summary table with measured data, if performance change is expected.

  • I have provided justification why performance and/or quality metrics have changed or why changes are not expected.

  • I have extended the benchmarking suite and provided a corresponding scikit-learn_bench PR if new measurable functionality was introduced in this PR.
  • I am going to extend scikit-learn_bench with EmpiricalCovariance, but this was not done yet.

    </details>

    Diff: 312 lines (+234 / -78) across 3 files Reviewer: Vika-F Review duration: 31456m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 312 lines diff across 3 files
    0.40
    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%
    60%
    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.344
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3787"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    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: 40.3% (MEDIUM) · Higher = larger blast radius
    40.3%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 15.9% · Safe to merge
    15.9%