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

[BUG] #98

Open
AliHaiderAhmad001 opened this issue Apr 13, 2022 · 0 comments
Open

[BUG] #98

AliHaiderAhmad001 opened this issue Apr 13, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@AliHaiderAhmad001
Copy link

This template is ONLY to be used for reporting bugs in the code.

The flat_classification_report function is not working (in train_seq function), there is a strange problem with it

Location

https://github.com/practical-nlp/practical-nlp-code/blob/master/Ch5/02_NERTraining.ipynb

Current Behavior

Training a Sequence classification model with CRF
0.9369945384072719

---------------------------------------------------------------------------

TypeError                                 Traceback (most recent call last)

[<ipython-input-21-5212b1f7685b>](https://localhost:8080/#) in <module>()
     15 
     16 if __name__=="__main__":
---> 17     main()

3 frames

[/usr/local/lib/python3.7/dist-packages/sklearn_crfsuite/metrics.py](https://localhost:8080/#) in flat_classification_report(y_true, y_pred, labels, **kwargs)
     66     """
     67     from sklearn import metrics
---> 68     return metrics.classification_report(y_true, y_pred, labels, **kwargs)
     69 
     70 

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

Expected Behavior

It should have worked like on your notebook

Possible Solution

I think it's been ignored or its structure changed

@AliHaiderAhmad001 AliHaiderAhmad001 added the bug Something isn't working label Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants