text_plain_output_2.png application_vnd.jupyter.stderr_output_1.png
from sklearn import datasets

from sklearn.multiclass import OutputCodeClassifier

from sklearn.svm import LinearSVC

from sklearn import datasets
from sklearn.multiclass import OutputCodeClassifier
from sklearn.svm import LinearSVC
X, y = datasets.load_iris(return_X_y=True)
clf = OutputCodeClassifier(LinearSVC(random_state=0), code_size=2, random_state=0)
clf.fit(X, y).predict(X)