File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 33
33
34
34
# See what the classifier predicts for some new tweets:
35
35
predictions = nb .predict (counts )
36
- < << << << HEAD :test - algorithm - 1. py
37
- correct = sum (predictions == fixed_target )
38
- incorrect = sum (predictions != fixed_target )
39
- acc = correct / (len (fixed_target ))
40
- print (acc )
41
- == == == =
36
+
42
37
correct_predictions = sum (predictions == target )
43
38
incorrect_predictions = 9092 - correct_predictions # (there are 9,092 tweets in the csv)
44
39
print ('# of correct predictions: ' + str (correct_predictions ))
45
40
print ('# of incorrect predictions: ' + str (incorrect_predictions ))
46
41
print ('Percent correct: ' + str (100.0 * correct_predictions / (correct_predictions + incorrect_predictions )))
47
- > >> >> >> a85337990f2d389bd846bc203e53a58cbab4e5a7 :test_algorithm_1 .py
You can’t perform that action at this time.
0 commit comments