Showing
1 changed file
with
5 additions
and
3 deletions
| ... | @@ -102,9 +102,11 @@ if args.traind and not args.input: | ... | @@ -102,9 +102,11 @@ if args.traind and not args.input: |
| 102 | if args.split: | 102 | if args.split: |
| 103 | X = vectorizer.transform(X_test) | 103 | X = vectorizer.transform(X_test) |
| 104 | y_pred = clf.predict(X) | 104 | y_pred = clf.predict(X) |
| 105 | - print(precision_score(y_test, y_pred)) | 105 | + print("Test results: ") |
| 106 | - print(recall_score(y_test, y_pred)) | 106 | + print("Precision: {}".format(precision_score(y_test, y_pred))) |
| 107 | - print(f1_score(y_test, y_pred)) | 107 | + print("Recall: {}".format(recall_score(y_test, y_pred))) |
| 108 | + print("F-score: {}".format(f1_score(y_test, y_pred))) | ||
| 109 | + print("Classification report:") | ||
| 108 | print(classification_report(y_test, y_pred)) | 110 | print(classification_report(y_test, y_pred)) |
| 109 | else: | 111 | else: |
| 110 | from pdb import set_trace as st | 112 | from pdb import set_trace as st | ... | ... |
-
Please register or login to post a comment