Skip to content

Commit

Permalink
Merge pull request udacity#24 from udacity/new-branch
Browse files Browse the repository at this point in the history
Removed orphaned code and added additional context for division by zero
  • Loading branch information
jared-weed committed Sep 9, 2015
2 parents 7ea6837 + cf1bccf commit 126f267
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 126f267

Please sign in to comment.