Classification transcription factor structural domain sentences
Showing
1 changed file
with
5 additions
and
2 deletions
... | @@ -309,10 +309,13 @@ if __name__ == "__main__": | ... | @@ -309,10 +309,13 @@ if __name__ == "__main__": |
309 | for param in sorted(best_parameters.keys()): | 309 | for param in sorted(best_parameters.keys()): |
310 | oFile.write("\t%s: %r\n" % (param, best_parameters[param])) | 310 | oFile.write("\t%s: %r\n" % (param, best_parameters[param])) |
311 | if args.classifier == "SVM": | 311 | if args.classifier == "SVM": |
312 | + if args.kernel == "linear": | ||
313 | + oFile.write('\nWeights assigned to the features: \n') | ||
314 | + oFile.write("{}\n".format(myClassifier.coef_)) | ||
312 | oFile.write('Confidence scores: \n') | 315 | oFile.write('Confidence scores: \n') |
313 | oFile.write("{}\n".format(confidence_scores)) | 316 | oFile.write("{}\n".format(confidence_scores)) |
314 | - oFile.write('Number of support vectors per class: \n{}\n'.format(classifier.n_support_)) | 317 | + oFile.write('Number of support vectors per class: \n{}\n'.format(myClassifier.n_support_)) |
315 | - oFile.write('Support vectors: \n{}\n'.format(classifier.support_vectors_)) | 318 | + oFile.write('Support vectors: \n{}\n'.format(myClassifier.support_vectors_)) |
316 | 319 | ||
317 | print(" Done!") | 320 | print(" Done!") |
318 | 321 | ... | ... |
-
Please register or login to post a comment