Showing
1 changed file
with
5 additions
and
5 deletions
... | @@ -72,7 +72,7 @@ if __name__ == "__main__": | ... | @@ -72,7 +72,7 @@ if __name__ == "__main__": |
72 | print("File to read evaluation true classes: " + str(args.inputEvaluationClasses)) | 72 | print("File to read evaluation true classes: " + str(args.inputEvaluationClasses)) |
73 | print("Path to place output files: " + str(args.outputPath)) | 73 | print("Path to place output files: " + str(args.outputPath)) |
74 | print("File to write evaluation report: " + str(args.outputFile)) | 74 | print("File to write evaluation report: " + str(args.outputFile)) |
75 | - print("Classifier: " + str(args.outputFile)) | 75 | + print("Classifier: " + str(args.classifier)) |
76 | 76 | ||
77 | # Start time | 77 | # Start time |
78 | t0 = time() | 78 | t0 = time() |
... | @@ -123,7 +123,7 @@ if __name__ == "__main__": | ... | @@ -123,7 +123,7 @@ if __name__ == "__main__": |
123 | if args.classifier == "MultinomialNB": | 123 | if args.classifier == "MultinomialNB": |
124 | classifier = MultinomialNB() | 124 | classifier = MultinomialNB() |
125 | elif args.classifier == "SVM": | 125 | elif args.classifier == "SVM": |
126 | - classifier = SVC() | 126 | + classifier = SVC(kernel="linear") |
127 | elif args.classifier == "DecisionTree": | 127 | elif args.classifier == "DecisionTree": |
128 | classifier = DecisionTreeClassifier() | 128 | classifier = DecisionTreeClassifier() |
129 | elif args.classifier == "Perceptron": | 129 | elif args.classifier == "Perceptron": |
... | @@ -154,9 +154,9 @@ if __name__ == "__main__": | ... | @@ -154,9 +154,9 @@ if __name__ == "__main__": |
154 | oFile.write("{}".format(classifier.coef_)) | 154 | oFile.write("{}".format(classifier.coef_)) |
155 | oFile.write('Confidence scores: \n') | 155 | oFile.write('Confidence scores: \n') |
156 | oFile.write("{}".format(confidence_scores)) | 156 | oFile.write("{}".format(confidence_scores)) |
157 | - if args.classifier == "SVM": | 157 | + if args.classifier == "SVM": |
158 | - oFile.write('Number of support vectors per class: {}\n'.format(classifier.n_support_)) | 158 | + oFile.write('Number of support vectors per class: {}\n'.format(classifier.n_support_)) |
159 | - oFile.write('Support vectors: {}\n'.format(classifier.support_vectors_)) | 159 | + oFile.write('Support vectors: {}\n'.format(classifier.support_vectors_)) |
160 | 160 | ||
161 | print(" Saving evaluation report done!") | 161 | print(" Saving evaluation report done!") |
162 | 162 | ... | ... |
-
Please register or login to post a comment