New issue 733 by anirudh....@gmail.com: ValueError: A ELE probability
distribution must have at least one bin.
http://code.google.com/p/nltk/issues/detail?id=733
What version of NLTK are you using? (See nltk.__version__). Please only
submit bug reports for the current version.
Name: nltk
Version: 2.0.1rc1
What steps will reproduce the problem? (e.g. include Python source code)
>>> import spambot as s
>>> c=s.spamclassifier()
>>> c.classifier()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "spambot.py", line 58, in classifier
classifier= NaiveBayesClassifier.train(training_set)
File "/usr/local/lib/python2.7/dist-packages/nltk/classify/naivebayes.py",
line 215, in train
label_probdist = estimator(label_freqdist)
File "/usr/local/lib/python2.7/dist-packages/nltk/probability.py", line
916, in __init__
LidstoneProbDist.__init__(self, freqdist, 0.5, bins)
File "/usr/local/lib/python2.7/dist-packages/nltk/probability.py", line
802, in __init__
'must have at least one bin.')
ValueError: A ELE probability distribution must have at least one bin.
What is the expected output? What do you see instead?
The expected output is accuracy of the Naive Bayes classifier for the given
training set.
Previously my code was running properly . I got the desired output. Now, I
don't get the output at all. The above error pops up.
Please help me out with this issue ASAP. My final year project is dependent
on this
Attachments:
spambot.py 2.8 KB
Comment #1 on issue 733 by StevenBird1: ValueError: A ELE probability
distribution must have at least one bin.
http://code.google.com/p/nltk/issues/detail?id=733
This issue tracker is closed. Please use the NLTK github issue tracker
instead. Please only report issues with the current version.