8000 Problem with multiclass · Issue #13 · catboost/catboost · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Problem with multiclass #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and 8000 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

Closed
DBusAI opened this issue Jul 18, 2017 · 3 comments
Closed

Problem with multiclass #13

DBusAI opened this issue Jul 18, 2017 · 3 comments

Comments

@DBusAI
Copy link
DBusAI commented Jul 18, 2017
clf = cb.CatBoostClassifier()
score = cross_val_score(clf,x_train2,y,cv=5,scoring='neg_log_loss')
score.mean()

/usr/local/lib/python2.7/dist-packages/catboost/core.pyc in _fit(self, X, y, cat_features, sample_weight, baseline, use_best_model, eval_set, verbose, plot)
386 raise ImportError(e.message)
387 with log_fixup():
--> 388 self._train(X, eval_set, params)
389 if calc_feature_importance:
390 setattr(self, "feature_importance", self.feature_importances(X))

_catboost.pyx in _catboost._CatBoostBase._train (/home/rnefyodov/.ya/build/build_root/7466703371396a7832336d7773326674/catboost/python-package/catboost/_catboost.pyx.cpp:13630)()

_catboost.pyx in _catboost._CatBoost._train (/home/rnefyodov/.ya/build/build_root/7466703371396a7832336d7773326674/catboost/python-package/catboost/_catboost.pyx.cpp:9713)()

_catboost.pyx in _catboost._CatBoost._train (/home/rnefyodov/.ya/build/build_root/7466703371396a7832336d7773326674/catboost/python-package/catboost/_catboost.pyx.cpp:9507)()

CatboostError: catboost/libs/algo/train_model.cpp:109: All targets are greater than border

@donskov7
Copy link
donskov7 commented Jul 18, 2017

For multiclass use loss_function='MultiClass'
clf = cb.CatBoostClassifier(loss_function='MultiClass')

@DBusAI
Copy link
Author
DBusAI commented Jul 18, 2017

Thx

@DBusAI DBusAI closed this as completed Jul 18, 2017
@prasanth-ntu
Copy link

Thanks. It worked for the multiclass now.

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

3 participants
0