Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def predict(example):
def NaiveBayesLearner(dataset, continuous=True, simple=False):
if simple:
return NaiveBayesSimple(dataset)
if(continuous):
if continuous:
return NaiveBayesContinuous(dataset)
else:
return NaiveBayesDiscrete(dataset)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def test_neural_network_learner():
([7.3, 4.0, 6.1, 2.4], 2),
([7.0, 3.3, 6.1, 2.5], 2)]
assert grade_learner(nNL, tests) >= 1/3
assert err_ratio(nNL, iris) < 0.2
assert err_ratio(nNL, iris) < 0.21


def test_perceptron():
Expand Down