From 5d9ddb5e88ba60fd2deb5715a27b551eea65f6f0 Mon Sep 17 00:00:00 2001 From: Lucas Moura Date: Fri, 7 Apr 2017 11:00:46 -0300 Subject: [PATCH] Fix learning tests --- tests/test_learning.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/tests/test_learning.py b/tests/test_learning.py index ecba5e0d4..0e657f1f6 100644 --- a/tests/test_learning.py +++ b/tests/test_learning.py @@ -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") @@ -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") 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