ENH: Add GCV Computation Path for `t != x` #5
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.44) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 214 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.321
Real PR Conversation Timeline
1 comments
"Review active on #5"
general
weight: 0.35
aadya940
Adds automatic smoothing parameter selection to the
t=path ofmake_smoothing_spline: calling with user knots and nolamnow selectslamby minimizing the generalized cross-validation (GCV) criterion, matching the behavior of the defaultt=Nonepath. Previously this raisedNotImplementedError.Builds on the
userknotsbranch (scipy#25862). The derivation of the criterion and the supporting experiments are in the companion report, Sections 12 and 15: https://github.com/aadya940/scipy-bspline-testingWhat was added
_make_smoothing_spline_user_knots_gcv: minimizes the GCV score over the base-10 logarithm oflamwithminimize_scalar(method="bounded"). The log transform is essential: on a linear axis the GCV minimum occupies a vanishing fraction of the search interval and bounded scalar minimizers fail silently._solve_smoothing_spline_coefficients: shared kernel for both the explicit-lamfit and the GCV objective. One banded solve per evaluation; withcompute_trace=Trueit also returns the trace of the influence matrix, computed from the central bands of the inverse only._compute_b_inv(the Hutchinson and de Hoog banded partial inverse) hoisted from inside_compute_optimal_gcv_parameterto module level, unchanged, and now shared by the existingt=NoneGCV path and the new path.lamregions instead of raising mid-optimization.