[objective] Bound the Poisson and Cox intercepts away from zero #12864
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 210 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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
Diff Size
diff_size
0.320
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #12864"
general
weight: 0.35
trivialfis
count:poissonandsurvival:coxturnbase_scoreinto a margin withlog, so a negativebase_score(or zero for Cox) gives NaN predictions:This bounds the intercept away from zero before the log, as #12848 did for
reg:tweedie, so there is no host-side validation. For Cox,base_scoreis only ever user-provided (it isn't estimated), so only invalid values change.For Poisson, all-zero labels give a zero estimated intercept. That used to become a
-infmargin with predictions of exactly 0; with the bound the predictions are about1e-6, as with Tweedie since #12848.Tests:
TestPoissonRegressionBasicandTestCoxRegressionGPaircheck that a zero and a negative intercept givelog(kRtEps).test_non_positive_base_scoreintests/python/test_intercept.pytrains with each of the values above and checks that the predictions are finite. It fails on master (NaN predictions in all three cases).tests/python/test_intercept.py,test_basic_models.pyand the C++Objective.*tests pass locally (CPU build), and ruff and clang-format are clean on the changed files.🤖 Generated with Claude Code
https://claude.ai/code/session_01BkmCTWMg2it3bqF24WKx9m