Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'LinearSVC' object has no attribute 'classes_' #2

Open
vinothkumar91 opened this issue Jan 30, 2016 · 1 comment
Open

Comments

@vinothkumar91
Copy link

Traceback (most recent call last):
File "/Users/ThomasInnovation/PycharmProjects/TextRecognition/main.py", line 14, in
maybe_text = user.select_text_among_candidates('/Users/ThomasInnovation/PycharmProjects/TextRecognition/linearsvc-hog-fulltrain2-90.pickle')
File "/Users/ThomasInnovation/PycharmProjects/TextRecognition/userimageski.py", line 103, in select_text_among_candidates
is_text = model.predict(self.candidates['flattened'])
File "/Library/Python/2.7/site-packages/sklearn/utils/metaestimators.py", line 37, in
out = lambda _args, *_kwargs: self.fn(obj, args, *kwargs)
File "/Library/Python/2.7/site-packages/sklearn/pipeline.py", line 204, in predict
return self.steps[-1][-1].predict(Xt)
File "/Library/Python/2.7/site-packages/sklearn/linear_model/base.py", line 273, in predict
return self.classes
[indices]
AttributeError: 'LinearSVC' object has no attribute 'classes
'

@SarfraazMsa
Copy link

pip install scikit-learn==0.15.2 ...it will work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants