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

Skip to content

Tests: Extend Learning Tests #483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2017
Merged
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
4 changes: 4 additions & 0 deletions tests/test_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,17 @@ def test_k_nearest_neighbors():

kNN = NearestNeighborLearner(iris,k=3)
assert kNN([5,3,1,0.1]) == "setosa"
assert kNN([6,5,3,1.5]) == "versicolor"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal, but there should be a space after commas.

assert kNN([7.5,4,6,2]) == "virginica"


def test_decision_tree_learner():
iris = DataSet(name="iris")

dTL = DecisionTreeLearner(iris)
assert dTL([5,3,1,0.1]) == "setosa"
assert dTL([6,5,3,1.5]) == "versicolor"
assert dTL([7.5,4,6,2]) == "virginica"


def test_neural_network_learner():
Expand Down