Skip to content

Commit

Permalink
Fix bernoulli testing
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherjenness committed Aug 10, 2017
1 parent 25b0164 commit fad1024
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_naivebayes.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ def test_bernoulli_naive_bayes():
X, y = data.categorical_2Dmatrix_data()
nb = naivebayes.BernoulliNaiveBayes()
nb.fit(X, y)
for index, row in enumerate(X):
predicted_y = nb.predict(row)
assert predicted_y == y[index]
predicted_y = nb.predict(X[0])
assert predicted_y == y[0]


def test_bernoulli_naive_bayes_probs():
Expand Down

0 comments on commit fad1024

Please sign in to comment.