Draft
Conversation
ptuan5
approved these changes
Nov 12, 2025
ptuan5
left a comment
There was a problem hiding this comment.
Changes in the scripts overall look good to me.
Cannot comment on the changes to the ui part because it's beyond my comprehension.
| with warnings.catch_warnings(): | ||
| warnings.simplefilter("ignore", category=FutureWarning) | ||
| self._classifier = self._fit_xgboost(features, labels, random_seed=random_seed) | ||
| self._classifier.fit(self._clean_features_for_training(features), labels) |
There was a problem hiding this comment.
you use clean_features here for the calibrated branch, but not for the old, original branch?
|
|
||
| Args: | ||
| truth: Binary ground truth labels (0 or 1). | ||
| probabilities: Predicted probabilities (2D array where second column is positive class). |
There was a problem hiding this comment.
for brier_score, accepting both 1D and 2D arrays, but here you only accept 2D arrays. Is there a reason for this? Should we enforce 2D altogether?
| if pos == 0 or neg == 0: | ||
| warnings.warn( | ||
| "plot_reliability: need both positive and negative labels.", stacklevel=2 | ||
| ) |
There was a problem hiding this comment.
if we need both positive and negative for this, should we either raise an error or return early?
keithshep
approved these changes
Jan 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview: Probability Calibration via CalibratedClassifierCV
What it is
CalibratedClassifierCV wraps any classifier (RF/GBT/XGBoost, etc.) and learns a mapping from raw model scores to well-calibrated probabilities. It does this with an internal cross-validation loop: in each fold, it fits the base model on train-fold data and learns a calibration function on the fold’s held-out data. Two calibration methods are supported:
Why calibration matters
Tree models often output overconfident probabilities (lots of ~0.0 or ~1.0). Calibration fixes this so that predicted probabilities reflect reality (e.g., among samples with p≈0.7, ~70% are positive). Better calibration improves:
How we use it in JABS
Practical guidance
Trade-offs
Net impact for JABS
See Also
User Guide
I'm going to hold off on updating the user guide until I'm sure we're going to merge these changes
Settings Dialog Screenshots