python - multilabel classification with OneVsOneClassifier -
is possible 1 multilabel classification onevsoneclassifier?
i made classification of onevsrestclassifier follows:
lb = preprocessing.multilabelbinarizer() y = lb.fit_transform(y_train) classifier = pipeline([ ('vectorizer',countvectorizer()), ('tfidf',tfidftransformer()), ('clf',onevsrestclassifier(svc(kernel='linear')))]) classifier.fit(x_train,y) predicted = classifier.predict(x_test) all_label = lb.inverse_transform(predicted) print all_label
but use onevsoneclassifier returns error indicating excessive number of labels.
Comments
Post a Comment