All notable changes to MCGrad will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fixed documentation inaccuracies in the MCE metrics page: corrected
mceformatting from percent to absolute scale, added documentation for MDE and all four available scales, and clarified statistical interpretation of sigma threshold and p-value.
- Improved early stopping performance by caching per-fold metric DataFrames and fold splits, avoiding redundant DataFrame reconstruction on every round × fold × metric evaluation (#229)
- Speed up fitting with early stopping and save training performance enabled: Remove redundant
_predictcall on the training set in_determine_best_num_rounds, reusing predictions already returned by_fit_single_roundinstead (#236) - Unified
logistic()andlogistic_vectorized()into a singlelogistic()function that handles both scalar and array inputs. Thelogistic_vectorizedalias has been removed. Performance improvement of ~16x on large arrays by using native NumPy operations instead ofnp.vectorize. - Vectorized
segments_ecce_pvaluecomputation inMulticalibrationErrorusing NumPy broadcasting instead ofnp.vectorize. Code quality improvement; does not meaningfully affect end-to-end MCE computation time since p-value calculation is <0.1% of the pipeline (dominated by segment generation and ECCE computation). - Eliminated redundant
segments * sample_weightbroadcast in_calculate_cumulative_differences(~6% faster on the ECCE computation hot path). - Eliminated redundant
segments * sample_weightbroadcast in_ecce_standard_deviation_per_segment(~30% faster on the std dev computation hot path). - Replaced per-segment
pd.DataFramecreation with batch list accumulation inget_segment_masks, yielding 2.2-3.1x speedup on the segment generation hot path (~53% of total pipeline time).
- Conda / Mamba installation instructions to the documentation (#234)
youdens_jmetric (Youden's J statistic / informedness) in themetricsmodule. Computes the continuous net detection rate asE[scores | positive] - E[scores | negative], ranging from -1 to 1, with support for sample weights (#233)- Support for float calibration targets (soft labels) in
MCGrad. Labels can now be continuous values in [0, 1] instead of only binary 0/1 or True/False. This enables calibrating to confidence-weighted labels that account for label uncertainty and quality. soft_label_log_lossfunction in themetricsmodule for soft-label cross-entropy, used as the default early stopping metric inMCGrad.- Feature consistency check in
predict()that validates feature names and order match those used duringfit(). Previously, mismatched features produced confusing encoder errors or silently wrong predictions when feature order was swapped. - Feature names are now included in the serialized model JSON for consistency validation after deserialization
- Regression support in
MulticalibrationError— newoutcome_type="regression"parameter uses successive-differences variance estimation (equation 6, appendix C from the MCE paper) instead of Bernoulli variance (#218) - Regression support in
tune_mcgrad_params— now acceptsRegressionMCGradmodels, uses the model'searly_stopping_score_funcinstead of hardcodednormalized_entropy(#213)
- Lowered psutil dependency to 5.9.0 to fix compatibility with Google Colab (#210)
- Fixed optimization direction in
tune_mcgrad_params— was incorrectly maximizing normalized entropy instead of minimizing it (#202)
use_model_predictionsparameter totune_mcgrad_paramsto control whether the surrogate model's predicted best or the actual best observed trial is returned (#196)mcgrad.tutorialssubmodule with shared tutorial helpers (data loading, plotting, logging utilities)
- Moved
folktablesfrom optional[tutorials]dependency to core dependencies
Note: Early pre-release versions (i.e., 0.0.0 and 0.1.0) were yanked due to packaging/versioning cleanup; 0.1.1 is the first stable public release.
- Initial release of this library. To cite this library, please cite our KDD 2026 paper "MCGrad: Multicalibration at Web Scale"
- Core multicalibration algorithm (
MCGrad,RegressionMCGrad) - Traditional calibration methods (
IsotonicRegression,PlattScaling,TemperatureScaling) - Segment-aware calibrators for grouped calibration
- Comprehensive metrics module with calibration error metrics, Kuiper statistics, and ranking metrics
MulticalibrationErrorclass for measuring multicalibration quality- Plotting utilities for calibration curves and diagnostics
- Hyperparameter tuning integration with Ax platform
- Full documentation website at mcgrad.dev
- Sphinx API documentation at mcgrad.readthedocs.io