title: Predicting multilabel data with sklearn
body: <p>According to the docs, the OneVsRest classifier supports multilabel classification: <a href="http://scikit-learn.org/stable/modules/multiclass.html#multilabel-learning" rel="noreferrer">http://scikit-learn.org/stable/modules/multiclass.html#multilabel-learning</a></p>
  
  <p>Here's the code I'm trying to run:</p>
  
  <pre><code>from sklearn import metrics
  from sklearn.preprocessing import MultiLabelBinarizer
  from sklearn.multiclass import OneVsRestClassifier
  from sklearn.cross_validation import train_test_split
  from sklearn.svm import SVC
  
  x = [[1,2,3],[3,3,2],[8,8,7],[3,7,1],[4,5,6]]
  y = [['bar','foo'],['bar'],['foo'],['foo','jump'],['bar','fox','jump']]
  
  y_enc = MultiLabelBinarizer().fit_transform(y)
  
  train_x, train_y, test_x, test_y = train_test_split(x, y_enc, test_size=0.33)
  
  clf = OneVsRestClassifier(SVC())
  clf.fit(train_x, train_y)
  predictions = clf.predict_proba(test_x)
  
  my_metrics = metrics.classification_report( test_y, predictions)
  print my_metrics
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "multilabel.py", line 178, in &lt;module&gt;
      clf.fit(train_x, train_y)
    File "/sklearn/lib/python2.6/site-packages/sklearn/multiclass.py", line 277, in fit
      Y = self.label_binarizer_.fit_transform(y)
    File "/sklearn/lib/python2.6/site-packages/sklearn/base.py", line 455, in fit_transform
      return self.fit(X, **fit_params).transform(X)
    File "/sklearn/lib/python2.6/site-packages/sklearn/preprocessing/label.py", line 302, in fit
      raise ValueError("Multioutput target data is not supported with "
  ValueError: Multioutput target data is not supported with label binarization
  </code></pre>
  
  <p>Not using the MultiLabelBinarizer gives the same error, so I'm assuming that's not the problem. Does anyone know how to use this classifier for multilabel data?</p>