Skip to content

Commit

Permalink
raise NotImplementedError
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubli committed Apr 23, 2018
1 parent 506ea6c commit 1db5a64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ def __init__(self, documents: Dict[str, List[str]]):
for word, frequency in self._get_word_freqs(doc).items():
self._word_freqs[current_class][word] += frequency
self._vocabulary.add(word)
#TODO: Calculate self._logprior and self._loglikelihood for all classes
# and words. Don't forget about smoothing.
raise NotImplementedError("Calculate self._logprior and "
"self._loglikelihood for all classes and "
"words. Don't forget about smoothing.") # TODO

def classify(self, document: str):
"""
Expand Down

0 comments on commit 1db5a64

Please sign in to comment.