From cf1bccf45d3d7d3031f7c5162f43bcf79e715884 Mon Sep 17 00:00:00 2001 From: Jared Weed Date: Wed, 9 Sep 2015 18:24:02 -0400 Subject: [PATCH] Removed orphaned code and added additional context for division by zero --- final_project/tester.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/final_project/tester.py b/final_project/tester.py index 65adcba5a1a..09ffc2b1696 100644 --- a/final_project/tester.py +++ b/final_project/tester.py @@ -12,8 +12,6 @@ import pickle import sys -from sklearn.metrics import precision_score -from sklearn.metrics import recall_score from sklearn.cross_validation import StratifiedShuffleSplit sys.path.append("../tools/") from feature_format import featureFormat, targetFeatureSplit @@ -73,6 +71,7 @@ def test_classifier(clf, dataset, feature_list, folds = 1000): print "" except: print "Got a divide by zero when trying out:", clf + print "Precision or recall may be undefined due to a lack of true positive predicitons." CLF_PICKLE_FILENAME = "my_classifier.pkl" DATASET_PICKLE_FILENAME = "my_dataset.pkl"