Skip to content

Commit

Permalink
Fixing SVM Issue #32. There were two area that called the ML modules.…
Browse files Browse the repository at this point in the history
… The first around line 61 was edited correctly, but the second around line 106 was missed. I corrected the problem by copying the code from the first instance to the second. This only seemed to be an issue with the evaluation dataset.
  • Loading branch information
AmyOlex committed Aug 26, 2018
1 parent e9f2942 commit 9c4f72c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Chrono/TimePhraseToChrono/PeriodInterval.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ def buildPeriodInterval(s, chrono_id, chrono_list, ref_list, classifier, feats):
if(classifier[1] == "NN"):
my_class = ChronoKeras.keras_classify(classifier[0], np.array(list(my_features.values())))
#print("Class: " + str(my_class) + " : Start: " + str(abs_Sspan) + " : End: "+ str(abs_Espan))
elif classifier[1] in ("SVM", "RF"):
feat_array = [int(i) for i in my_features.values()]
my_class = classifier[0].predict([feat_array])[0]
else:
my_class = classifier[0].classify(my_features)
#print("Class: " + str(my_class) + " : Start: " + str(abs_Sspan) + " : End: "+ str(abs_Espan))
Expand Down

0 comments on commit 9c4f72c

Please sign in to comment.