[API] Replaced `loss`/`method` parameter combo by `scoring` #814
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 237 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.327
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #814"
general
weight: 0.35
jpaillard
First of all, to help with all the modifications, I added a custom
check_scoring()function that is based on sklearn's function. It accepts:log_lossormean_squared_error, or any other sklearn-accepted scoring stringmake_scorer()or any custom valid scorerFrom there, I made the modifications starting on
BasePerturbation. There are a few modifications here. Since our estimators are mainly there to perform feature selection, I suggest that we entirely go in that direction, and proposed to get rid of_predict()internal methods. The estimators derived fromBasePerturbationwork with losses provided by the scorer, so I refactored the code in that direction by reducing code repetition, and revamped the internal method_joblib_predict_one_features_group()as_joblib_score_one_feature_group(). This allows to completely get rid ofLOCO.importance()since it's pure code duplication.LOCIis still a work in progress, but I should be able to finish this soon (I'm working on creating a private_LOCIBaselineEstimatorto work with the scoring system modifications). The tests fail because of this unfinished work, but on my side, all tests are valid forBasePerturbation,PFI,CFI, andLOCO.I'm opening this up to start code review and talk about the modifications I suggested. The modifications are pretty important as modifications on
BasePerturbationimpact a lot of code, so I suggest that we start the discussion incrementally by validating modifications on the base class, and then move to subclasses.I haven't modified the examples yet. I think it's best that we discuss about the modifications before reporting the changes in the examples.