Skip to content

Commit 1b66087

Browse files
committed
chore: prepare v0.2.8rc1 release candidate
- Update version to 0.2.8rc1 - Add CHANGELOG entry documenting: * SHAP integration features (alpha) * Performance improvements from @RektPunk (PRs #10, #11, #13, #14) - Release candidate includes both SHAP features and performance optimizations
1 parent b6acc27 commit 1b66087

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# Changelog
22

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+
344
## [0.2.8a1] - 2025-12-04 (Alpha)
445

546
### Added

xbooster/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from gradient boosted tree models (XGBoost and CatBoost).
66
"""
77

8-
__version__ = "0.2.8a2"
8+
__version__ = "0.2.8rc1"
99
__author__ = "xRiskLab"
1010
__email__ = "contact@xrisklab.ai"
1111

0 commit comments

Comments
 (0)