|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## [0.2.8rc1] - 2025-12-04 (Release Candidate) |
| 4 | + |
| 5 | +### Performance Improvements |
| 6 | +- **XGBoost Constructor Optimization** (PR #14, @RektPunk): Optimized `construct_scorecard()` method |
| 7 | + - Replaced loop-based DataFrame concatenation with vectorized operations |
| 8 | + - Significant performance improvement for models with many trees |
| 9 | + - Reduced code complexity while maintaining identical functionality |
| 10 | + |
| 11 | +- **LightGBM Constructor Optimizations** (PRs #10, #11, #13, @RektPunk): |
| 12 | + - **`construct_scorecard()` optimization** (PR #10): Vectorized binning table creation |
| 13 | + - **`_convert_tree_to_points()` optimization** (PR #11): Replaced loop+merge with vectorized lookup using `map()` |
| 14 | + - **`get_leafs()` optimization** (PR #13): Vectorized margin predictions across all trees |
| 15 | + - All optimizations maintain backward compatibility and numerical equivalence |
| 16 | + |
| 17 | +### Added |
| 18 | +- **SHAP Integration (Alpha)**: Added SHAP-based scoring for all three libraries |
| 19 | + - **XGBoost**: Native SHAP extraction using `pred_contribs=True` |
| 20 | + - **LightGBM**: Native SHAP extraction using `pred_contrib=True` |
| 21 | + - **CatBoost**: Native SHAP extraction using `get_feature_importance(type='ShapValues')` |
| 22 | + - New `method="shap"` option in `predict_score()` and `predict_scores()` methods |
| 23 | + - SHAP values computed on-demand (not stored in scorecard binning table) |
| 24 | + - Feature-level score decomposition via `predict_scores(method="shap")` |
| 25 | + - Particularly useful for models with `max_depth > 1` where interpretability is challenging |
| 26 | + - No external dependencies required (uses native SHAP implementations) |
| 27 | + |
| 28 | +### Changed |
| 29 | +- **SHAP Architecture Refactoring**: Moved all SHAP logic to dedicated `shap_scorecard.py` module |
| 30 | + - SHAP extraction functions centralized: `extract_shap_values_xgb()`, `extract_shap_values_lgb()`, `extract_shap_values_cb()` |
| 31 | + - SHAP computation is now optional and only performed when `method="shap"` is used |
| 32 | + - Removed SHAP column from scorecard binning tables (cleaner scorecard structure) |
| 33 | + - Simplified API: users don't need to import or call SHAP extraction functions directly |
| 34 | + |
| 35 | +### Technical Details |
| 36 | +- All three constructors now support SHAP: `XGBScorecardConstructor`, `LGBScorecardConstructor`, `CatBoostScorecardConstructor` |
| 37 | +- SHAP values computed using native library methods (no shap package dependency) |
| 38 | +- SHAP computation happens on-demand when `predict_score(method="shap")` or `predict_scores(method="shap")` is called |
| 39 | +- Backward compatible: traditional scorecard methods unchanged |
| 40 | +- Cleaner separation of concerns: scorecard construction vs. SHAP computation |
| 41 | +- Performance improvements reduce execution time for large models while maintaining numerical accuracy |
| 42 | +- Release candidate for community testing and feedback |
| 43 | + |
3 | 44 | ## [0.2.8a1] - 2025-12-04 (Alpha) |
4 | 45 |
|
5 | 46 | ### Added |
|
0 commit comments