Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow_const_label=True does not seem to work with CatBoostClassifier #1933

Closed
tristancinquin opened this issue Nov 24, 2021 · 1 comment
Closed

Comments

@tristancinquin
Copy link

Hi,

I am trying to get a CatBoostClassifier to work in a case where I only have one label. I saw that CatBoostClassifiers have the allow_const_label parameter for this. However, I still run into the error : catboost.CatBoostError: catboost/private/libs/target/target_converter.cpp:374: Target contains only one unique value.

The error is reproducible with the following code :

import catboost
model = CatBoostClassifier(allow_const_label=True)
model.fit([[1,1,1],[1,0,1],[0,1,1]], [1,1,1])

catboost version: 1.0.3
Operating System: MacOS 11.6.1
CPU: Yes
GPU: No

@andrey-khropov andrey-khropov changed the title allow_const_label=True does seem to work with CatBoostClassifier allow_const_label=True does not seem to work with CatBoostClassifier Jan 17, 2024
@andrey-khropov
Copy link
Member

Fixed in 79f1702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants