-
Notifications
You must be signed in to change notification settings - Fork 44
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
Divison by 0 #10
Comments
Hi Demcbs,
How about your n-gram setting!?
So zero in result's image.
You can check in ss3 class with doc for params.
Nice.
…On Fri, Jun 19, 2020, 11:31 PM demcbs ***@***.***> wrote:
I am eager to use the SS3 classifier for text classification task in my
master's thesis.
Unfortunately when I run it I get a division by zero error message, see
image. My text seems fairly clean (although not yet cleaned exactly the
right way) to me, so I am not sure what is causing this.
Is there anything you suspect might be going wrong which I could try? Or
anywhere where the data criteria are listed (I've looked but maybe I've
overlooked)?
I included the data structure (pandas series), some of what my data looks
like and the error.
Many thanks!
[image: image]
<https://user-images.githubusercontent.com/46752691/85156259-1bb6ff80-b25a-11ea-86b1-08902c21bfd6.png>
[image: image]
<https://user-images.githubusercontent.com/46752691/85156275-22457700-b25a-11ea-8ace-fdf03beee759.png>
[image: image]
<https://user-images.githubusercontent.com/46752691/85156305-2e313900-b25a-11ea-8deb-a971317c7786.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYAMLY5UPPAET7IGTOZOVTRXOHFNANCNFSM4OC34VTQ>
.
|
I created no n-grams, I put in the unstructured text, so that's the default n-gram size, I suppose. |
- Fix ZeroDivisionError bug (#10)
First of all, thanks for creating this issue and reporting this bug, @demcbs. Also, thank @IveJ for your comments 👍 I've found what the problem was, First, I created a small script to replicate the error, the smallest script that I could come up with was:
I found out that the problem was caused by the integer "0" label, it was triggering a condition as True when it shouldn't. (more details are given in the commit message 236a942). I've already released a new version (0.6.2) with the patch fixing this issue, so updating the package ( |
Thanks for the quick fix Sergio! |
I am eager to use the SS3 classifier for text classification task in my master's thesis.
Unfortunately when I run it I get a division by zero error message, see image. My text seems fairly clean (although not yet cleaned exactly the right way) to me, so I am not sure what is causing this.
Is there anything you suspect might be going wrong which I could try? Or anywhere where the data criteria are listed (I've looked but maybe I've overlooked)?
I included the data structure (pandas series), some of what my data looks like and the error.
Many thanks!
![image](https://user-images.githubusercontent.com/46752691/85156259-1bb6ff80-b25a-11ea-86b1-08902c21bfd6.png)
The text was updated successfully, but these errors were encountered: