Skip to content
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
19 changes: 0 additions & 19 deletions tests/test_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,6 @@ def test_weighted_replicate():
assert weighted_replicate('ABC', [1, 2, 1], 4) == ['A', 'B', 'B', 'C']


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

means, deviations = iris.find_means_and_deviations()

assert means["setosa"] == [5.006, 3.418, 1.464, 0.244]
assert means["versicolor"] == [5.936, 2.77, 4.26, 1.326]
assert means["virginica"] == [6.588, 2.974, 5.552, 2.026]

assert round(deviations["setosa"][0],3) == 0.352
assert round(deviations["versicolor"][0],3) == 0.516
assert round(deviations["virginica"][0],3) == 0.636


def test_plurality_learner():
zoo = DataSet(name="zoo")

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

# Continuous
nBC = NaiveBayesLearner(iris, continuous=True)
assert nBC([5,3,1,0.1]) == "setosa"
assert nBC([7,3,6.5,2]) == "virginica"


def test_k_nearest_neighbors():
iris = DataSet(name="iris")
Expand Down