Skip to content

Commit

Permalink
correct typo
Browse files Browse the repository at this point in the history
  • Loading branch information
sfchen committed Aug 21, 2016
1 parent 0de12a6 commit edb7380
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def parseCommand():
parser.add_option("-m", "--model", dest = "model_file", default = "cfdna.model",
help = "specify which file to store the built model.")
parser.add_option("-a", "--algorithm", dest = "algorithm", default = "knn",
help = "specify which algorithm to use for classfication, candidates are svm/knn/rbf/rf/gnb/benchmark, rbf means svm using rbf kernel, rf means random forrest, gnb means Gaussian Naive Bayes, benchmark will try every algorithm and plot the score figure, default is knn.")
help = "specify which algorithm to use for classfication, candidates are svm/knn/rbf/rf/gnb/benchmark, rbf means svm using rbf kernel, rf means random forest, gnb means Gaussian Naive Bayes, benchmark will try every algorithm and plot the score figure, default is knn.")
parser.add_option("-c", "--cfdna_flag", dest = "cfdna_flag", default = "cfdna",
help = "specify the filename flag of cfdna files, separated by semicolon. default is: cfdna")
parser.add_option("-o", "--other_flag", dest = "other_flag", default = "gdna;ffpe",
Expand Down Expand Up @@ -226,7 +226,7 @@ def main():
train(model, data, label, samples, options)
elif options.algorithm.lower() == "benchmark":
print("\nstarting benchmark...")
names = ["KNN", "Random Forrest","SVM Linear", "Gaussian Naive Bayes", "SVM RBF"]
names = ["KNN", "Random Forest","SVM Linear Kernel", "Gaussian Naive Bayes", "SVM RBF Kernel"]
models = [neighbors.KNeighborsClassifier(leaf_size=100), RandomForestClassifier(n_estimators=20), svm.LinearSVC(), GaussianNB(), svm.SVC(kernel='rbf')]
scores_arr = [train(model, data, label, samples, options, True) for model in models]
print("ploting benchmark result...")
Expand Down

0 comments on commit edb7380

Please sign in to comment.