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

flat_classification_report seems to be broken #66

Open
chriswales95 opened this issue Oct 27, 2021 · 5 comments
Open

flat_classification_report seems to be broken #66

chriswales95 opened this issue Oct 27, 2021 · 5 comments

Comments

@chriswales95
Copy link

Hi,

it appears that flat_classification_report is now broken. Scikit-learn's classification_report no longer uses positional arguments anymore and was deprecated prior a while back. It seems this is now being enforced.

Specifically, the issue is that labels are no longer a positional argument and is instead a keyword argument.

It seems to be a simple fix so I can submit a pull request later.

@chriswales95
Copy link
Author

chriswales95 commented Oct 27, 2021

I've opened a pull request.

#67

@tkngoutham
Copy link

This bug is not fixed yet. Kindly some one do the merge and let the issue gets resolved

@PawanKrGunjan
Copy link

metrics.flat_classification_report(test_labels, y_pred, labels=labels, digits=3)

TypeError: classification_report() takes 2 positional arguments but 3 positional arguments (and 1 keyword-only argument) were given

@drizk1
Copy link

drizk1 commented Mar 26, 2023

so is there still no fix?

@PawanKrGunjan
Copy link

`from sklearn_crfsuite.utils import flatten

print(metrics.flat_classification_report(y_test,
y_pred,
labels=sorted_labels,
digits=3
)
)`

Check this notebook:
https://www.kaggle.com/code/pawankumargunjan/sklearn-crfsuite

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

4 participants