Metadata-Version: 2.4
Name: gbdtCBL
Version: 0.2.0
Summary: Class-balanced loss functions for gradient boosting decision trees
Author: Jiaqi Luo, Yuan Yuan, Shixin Xu
License-Expression: MIT
Project-URL: Homepage, https://github.com/Luojiaqimath/ClassbalancedLoss4GBDT
Project-URL: Repository, https://github.com/Luojiaqimath/ClassbalancedLoss4GBDT
Project-URL: Issues, https://github.com/Luojiaqimath/ClassbalancedLoss4GBDT/issues
Project-URL: Paper, https://doi.org/10.1016/j.neucom.2025.129896
Keywords: class imbalance,gradient boosting,LightGBM,XGBoost,Py-Boost,machine learning
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21
Requires-Dist: scikit-learn>=1.0
Provides-Extra: xgboost
Requires-Dist: xgboost; extra == "xgboost"
Provides-Extra: lightgbm
Requires-Dist: lightgbm; extra == "lightgbm"
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# gbdtCBL

`gbdtCBL` provides class-balanced loss functions for gradient boosting
decision trees. It supports binary, multi-class, and multi-label
classification workflows with XGBoost, LightGBM, and Py-Boost.

## Python support

Version 0.2.0 supports Python 3.9 and newer, including Python 3.12, 3.13,
and 3.14. Backend-specific GPU support also depends on the Python, CUDA, CuPy,
and backend versions installed in your environment.

## Installation

The package uses the standard Python wheel format and can be installed in an
Anaconda/Miniconda environment or a regular Python environment.

With Anaconda/Miniconda:

```bash
conda create --name gbdtcbl python=3.12 pip -y
conda run --name gbdtcbl python -m pip install gbdtCBL
```

With regular Python:

```bash
python -m pip install gbdtCBL
```

Optional CPU backends can be installed with:

```bash
python -m pip install "gbdtCBL[xgboost]"
python -m pip install "gbdtCBL[lightgbm]"
```

Py-Boost users should install `py-boost` and the CuPy package matching their
CUDA version separately.

## Modules

- `gbdtCBL.binary`: binary losses for XGBoost and LightGBM
- `gbdtCBL.xgbmulti`: multi-class losses for XGBoost
- `gbdtCBL.lgbmulti`: multi-class losses for LightGBM
- `gbdtCBL.binarycupy`: GPU binary and multi-label losses for Py-Boost
- `gbdtCBL.multicupy`: GPU multi-class losses for Py-Boost

Usage examples and datasets are maintained in the
[GitHub repository](https://github.com/Luojiaqimath/ClassbalancedLoss4GBDT).

## Reference

Jiaqi Luo, Yuan Yuan, and Shixin Xu,
[“Improving GBDT performance on imbalanced datasets: An empirical study of
class-balanced loss functions”](https://doi.org/10.1016/j.neucom.2025.129896),
*Neurocomputing* 634 (2025), 129896.

## License

MIT
