When I try to test the classifier, run the performRecognition.py script, I faced this problem, and I have no idea how to deal with that. I tried to run it in python 2 and python 3, it all has problems, hope someone can help me, thank you!
pi@raspberrypi:~/digit-recognition $ python performRecognition.py -c digits_cls.pkl -i photo_1.jpg
Traceback (most recent call last):
File "performRecognition.py", line 51, in
nbr = clf.predict(roi_hog_fd)
File "/usr/lib/python2.7/dist-packages/sklearn/linearmodel/base.py", line 228, in predict
return self.classes[indices]
File "/usr/lib/python2.7/dist-packages/sklearn/svm/base.py", line 709, in classes_
return self.enc.classes
AttributeError: 'LinearSVC' object has no attribute '_enc'
When I try to test the classifier, run the
performRecognition.py
script, I faced this problem, and I have no idea how to deal with that. I tried to run it in python 2 and python 3, it all has problems, hope someone can help me, thank you!pi@raspberrypi:~/digit-recognition $ python performRecognition.py -c digits_cls.pkl -i photo_1.jpg Traceback (most recent call last): File "performRecognition.py", line 51, in
nbr = clf.predict(roi_hog_fd)
File "/usr/lib/python2.7/dist-packages/sklearn/linearmodel/base.py", line 228, in predict
return self.classes[indices]
File "/usr/lib/python2.7/dist-packages/sklearn/svm/base.py", line 709, in classes_
return self.enc.classes
AttributeError: 'LinearSVC' object has no attribute '_enc'