Skip to content

Commit

Permalink
Problem solved for ValueError in FeatureHasher and naive bayes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nineil committed Jun 30, 2014
1 parent 43b27a6 commit 760e7ab
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions tests/test_skll.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,12 +544,6 @@ def test_summary_feature_hasher():
outstr = f.read()
logistic_result_score = float(SCORE_OUTPUT_RE.search(outstr).groups()[0])

with open(os.path.join(_my_dir, 'output',
'test_summary_feature_hasher_test_summary_MultinomialNB.results')) \
as f:
outstr = f.read()
naivebayes_result_score = float(SCORE_OUTPUT_RE.search(outstr).groups()[0])

with open(os.path.join(_my_dir, 'output',
'test_summary_feature_hasher_test_summary_SVC.results')) \
as f:
Expand All @@ -572,13 +566,10 @@ def test_summary_feature_hasher():

if row['learner_name'] == 'LogisticRegression':
logistic_summary_score = float(row['score'])
elif row['learner_name'] == 'MultinomialNB':
naivebayes_summary_score = float(row['score'])
elif row['learner_name'] == 'SVC':
svm_summary_score = float(row['score'])

for result_score, summary_score, learner_name in [(logistic_result_score, logistic_summary_score, 'LogisticRegression'),
(naivebayes_result_score, naivebayes_summary_score, 'MultinomialNB'),
(svm_result_score, svm_summary_score, 'SVC')]:
yield check_summary_score, result_score, summary_score, learner_name

Expand Down

0 comments on commit 760e7ab

Please sign in to comment.