AmyOlex / Chrono

Parsing time normalizations from text.
GNU General Public License v3.0
15 stars 4 forks source link

SVM has no 'classify' attribute #32

Open AmyOlex opened 6 years ago

AmyOlex commented 6 years ago

Getting the following error when I try to use SVM for the classifier:

File "/home/share/data/THYME/ChronoAnalysis_031918/Chrono/Chrono/TimePhrase_to_Chrono.py", line 1491, in buildPeriodInterval my_class = classifier[0].classify(my_features) AttributeError: 'LinearSVC' object has no attribute 'classify'

This might be a package version thing as I think it works ok on my mac.

maffeyl commented 6 years ago

So on stackoverflow someone said to use an older version of scikit, which solved the problem, but then created other problems.

maffeyl commented 6 years ago

Possible fix: https://stackoverflow.com/questions/47312432/attributeerrorlinearsvc-object-has-no-attribute-predict-proba

AmyOlex commented 6 years ago

This is still broken. I thought I was running SVM on Willow but it breaks on the evaluation dataset. I'd like to report the SVM values for the paper, so need to figure this out and get it working.