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
Predicted output coming wrong for textmodel_nb prediction #476
Comments
Thanks! Should be ok now. Note that there was a worse bug, when the > predict(textmodel_NB(trainingset, trainingclass, prior = "docfreq"))
Predicted textmodel of type: Naive Bayes
lp(Y) lp(N) Pr(Y) Pr(N) Predicted
d1 -3.928188 -6.591674 0.9348 0.0652 Y
d2 -3.928188 -6.591674 0.9348 0.0652 Y
d3 -3.080890 -5.087596 0.8815 0.1185 Y
d4 -6.413095 -5.898527 0.3741 0.6259 N
d5 -8.107690 -8.906681 0.6898 0.3102 Y |
Thanks kbnenoit for your quick responses and fixes. The package is really good and fast.
Regards,
Vibhuti Gupta,
Graduate Student
Computer Science
Research Assistant(IMMAP)
Texas Tech University
Ph: 8065006843
E-mail: vibhuti.gupta@ttu.edu
________________________________
From: Kenneth Benoit <notifications@github.com>
Sent: Wednesday, January 18, 2017 5:21:33 PM
To: kbenoit/quanteda
Cc: Gupta, Vibhuti; Author
Subject: Re: [kbenoit/quanteda] Predicted output coming wrong for textmodel_nb prediction (#476)
Thanks! Should be ok now.
predict(textmodel_NB(trainingset, trainingclass, prior = "docfreq"))
Predicted textmodel of type: Naive Bayes
lp(Y) lp(N) Pr(Y) Pr(N) Predicted
d1 -3.928188 -6.591674 0.9348 0.0652 Y
d2 -3.928188 -6.591674 0.9348 0.0652 Y
d3 -3.080890 -5.087596 0.8815 0.1185 Y
d4 -6.413095 -5.898527 0.3741 0.6259 N
d5 -8.107690 -8.906681 0.6898 0.3102 Y
-
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#476 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ASZS5FgUO8caASrBWF12O__gvRgNEvYjks5rTp59gaJpZM4LnK-W>.
|
Thanks! Would love you have you describe your experience through feedback in issue #461. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was working on naive bayes for text classification using your package. I was using textmodel_NB , for which you fixed a issue for the wrong priors using docfreq. Now its coming correct but the predictions should also be changed Please see the below example as mentioned in your package:
Output:
This is coming correct now
The prediction should be Y as Pr(Y)>Pr(N) but its is giving N
Please fix it to get the correct predictions.
The text was updated successfully, but these errors were encountered: