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

MultiLogloss can not be used if 'class weight' is specified. #2666

Open
davitens opened this issue May 17, 2024 · 0 comments
Open

MultiLogloss can not be used if 'class weight' is specified. #2666

davitens opened this issue May 17, 2024 · 0 comments

Comments

@davitens
Copy link

davitens commented May 17, 2024

Problem: can not use MultiLogloss with class weight
catboost version:1.2.3
Operating System: Windows 11
CPU: AMD Ryzen 5 5600G
GPU: None

In classification with multiple labels, MultiLogloss loss function can not be used if class weight is specified.

model = CatBoostClassifier(class_weights=weights, loss_function="MultiLogloss", eval_metric="MultiLogloss")

model.fit(X,y)`

It returns:

CatBoostError: C:/Go_Agent/pipelines/BuildMaster/catboost.git/catboost/private/libs/options/catboost_options.cpp:616: class weights takes effect only with Logloss, MultiClass, MultiClassOneVsAll and user-defined loss functions

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

No branches or pull requests

2 participants