JuliaAI / CatBoost.jl

Julia wrapper of the python library CatBoost for boosted decision trees
MIT License
11 stars 3 forks source link

Corner case: Training a classifier with only one class present #22

Closed ablaom closed 5 months ago

ablaom commented 1 year ago

Rather than complaining when only one class is seen, wouldn't a more robust approach be to predict the single class seen with probability one? At least, in the MLJ interface, where we track the complete target pool, this shouldn't pose any issues.

One hits this corner case when subsampling binary data with a small training set, unbalanced data, and/or lots of folds.

See also https://github.com/JuliaAI/CatBoost.jl/pull/20#issuecomment-1429286204.

tylerjthomas9 commented 5 months ago

Closed by #29