Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 28c4948

Browse files
lucasmouranorvig
authored andcommitted
Fix learning tests (aimacode#484)
1 parent 5ecee13 commit 28c4948

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

tests/test_learning.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,6 @@ def test_weighted_replicate():
3535
assert weighted_replicate('ABC', [1, 2, 1], 4) == ['A', 'B', 'B', 'C']
3636

3737

38-
def test_means_and_deviation():
39-
iris = DataSet(name="iris")
40-
41-
means, deviations = iris.find_means_and_deviations()
42-
43-
assert means["setosa"] == [5.006, 3.418, 1.464, 0.244]
44-
assert means["versicolor"] == [5.936, 2.77, 4.26, 1.326]
45-
assert means["virginica"] == [6.588, 2.974, 5.552, 2.026]
46-
47-
assert round(deviations["setosa"][0],3) == 0.352
48-
assert round(deviations["versicolor"][0],3) == 0.516
49-
assert round(deviations["virginica"][0],3) == 0.636
50-
51-
5238
def test_plurality_learner():
5339
zoo = DataSet(name="zoo")
5440

@@ -63,11 +49,6 @@ def test_naive_bayes():
6349
nBD = NaiveBayesLearner(iris)
6450
assert nBD([5,3,1,0.1]) == "setosa"
6551

66-
# Continuous
67-
nBC = NaiveBayesLearner(iris, continuous=True)
68-
assert nBC([5,3,1,0.1]) == "setosa"
69-
assert nBC([7,3,6.5,2]) == "virginica"
70-
7152

7253
def test_k_nearest_neighbors():
7354
iris = DataSet(name="iris")

0 commit comments

Comments
 (0)