Skip to content

Commit b0b1d6f

Browse files
antmarakisnorvig
authored andcommitted
Update test_learning.py (aimacode#483)
1 parent f9f6ecf commit b0b1d6f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_learning.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,17 @@ def test_k_nearest_neighbors():
5555

5656
kNN = NearestNeighborLearner(iris,k=3)
5757
assert kNN([5,3,1,0.1]) == "setosa"
58+
assert kNN([6,5,3,1.5]) == "versicolor"
59+
assert kNN([7.5,4,6,2]) == "virginica"
5860

5961

6062
def test_decision_tree_learner():
6163
iris = DataSet(name="iris")
6264

6365
dTL = DecisionTreeLearner(iris)
6466
assert dTL([5,3,1,0.1]) == "setosa"
67+
assert dTL([6,5,3,1.5]) == "versicolor"
68+
assert dTL([7.5,4,6,2]) == "virginica"
6569

6670

6771
def test_neural_network_learner():

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy