dmlc / dmlc/xgboost

Balanced XGBClassifier

Open
#6,419 0 comments 0 reactions 0 assignees View on GitHub
feature-request
Dominant language
C++
Stars
28.8k
Forks
8.9k
Avg merge
1d 12h
Merged PRs (30d)
54

Description

Is it possible to create a new XGBClassifier, or add a feature to the existing one to under-sample the majority class when we try to train on an imbalanced dataset? Currently, only the `scale_pos_weight` parameter can be used to tune the xgb classifier when training on imbalanced data. I think this would be a nice addon to the xgboost library.

The imbalanced learn library already has a BalancedRandomForstClassifier that works this way:
https://imbalanced-learn.readthedocs.io/en/stable/generated/imblearn.ensemble.BalancedRandomForestClassifier.html

Furthermore, if some could direct me, I could help with the implementation and a demo/benchmark if there would be any benefits of such a classifier.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.