We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi Thx for this great package It looks like there is an error when you use OneVsRestClassifier with SVCClassifier
I have this error
if clf.kernel != 'linear': AttributeError: 'OneVsRestClassifier' object has no attribute 'kernel'
Here is the little code snippet to reproduce the issue:
from sklearn.datasets import make_multilabel_classification, fetch_20newsgroups from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.multiclass import OneVsRestClassifier from sklearn.svm import SVC data_train = fetch_20newsgroups(subset='train', shuffle=True, random_state=42) vectorizer = TfidfVectorizer(stop_words='english') X_train = vectorizer.fit_transform(data_train.data[0:100]) y_train = data_train.target[0:100] classif = OneVsRestClassifier(SVC(kernel='linear')) classif.fit(X_train, y_train) expl = eli5.explain_prediction(classif, data_train.data[0], vec=vectorizer)
Thx a lot again
Olivier
The text was updated successfully, but these errors were encountered:
Hi If you change SVC by LinearSVC in the previous code snippet, it works ... Any reason SVC is not supported the same way?
Best regards Olivier
Sorry, something went wrong.
No branches or pull requests
Hi
Thx for this great package
It looks like there is an error when you use OneVsRestClassifier with SVCClassifier
I have this error
Here is the little code snippet to reproduce the issue:
Thx a lot again
Olivier
The text was updated successfully, but these errors were encountered: