Skip to content

Commit

Permalink
Removed orphaned code and added additional context for division by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared Weed committed Sep 9, 2015
1 parent 7ea6837 commit cf1bccf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions final_project/tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit cf1bccf

Please sign in to comment.