<p dir="auto">An estimator with multioutput support can be used for multilabel problems such as <a href="https://github.com/scikit-learn/scikit-learn/blob/ee328faa3601b40944ad43e28bce71860d39f2de/sklearn/ensemble/forest.py#L758"><code class="notranslate">RandomForestClassifier</code></a>. Its <a href="https://github.com/scikit-learn/scikit-learn/blob/ee328faa3601b40944ad43e28bce71860d39f2de/sklearn/ensemble/forest.py#L564"><code class="notranslate">predict_proba</code></a> methods returns</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/scikit-learn/scikit-learn/blob/ee328faa3601b40944ad43e28bce71860d39f2de/sklearn/ensemble/forest.py#L581-L582">scikit-learn/sklearn/ensemble/forest.py</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 581 to 582
      in
      <a data-pjax="true" class="commit-tease-sha" href="/scikit-learn/scikit-learn/commit/ee328faa3601b40944ad43e28bce71860d39f2de">ee328fa</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L581" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="581"></td>
          <td id="LC581" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">        p : array of shape = [n_samples, n_classes], or a list of n_outputs</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L582" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="582"></td>
          <td id="LC582" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">            such arrays if n_outputs &gt; 1.</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">Such estimators blends multilabel problems and multioutput problems because a multilabel problem is a special multioutput one.</p>
<p dir="auto">Most of the estimators don't support multilabel directly and <a href="https://github.com/scikit-learn/scikit-learn/blob/ee328faa3601b40944ad43e28bce71860d39f2de/sklearn/multiclass.py#L133"><code class="notranslate">OneVsRestClassifier</code></a> is required. Its <a href="https://github.com/scikit-learn/scikit-learn/blob/ee328faa3601b40944ad43e28bce71860d39f2de/sklearn/multiclass.py#L318"><code class="notranslate">predict_proba</code></a> method returns</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/scikit-learn/scikit-learn/blob/ee328faa3601b40944ad43e28bce71860d39f2de/sklearn/multiclass.py#L337-L339">scikit-learn/sklearn/multiclass.py</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 337 to 339
      in
      <a data-pjax="true" class="commit-tease-sha" href="/scikit-learn/scikit-learn/commit/ee328faa3601b40944ad43e28bce71860d39f2de">ee328fa</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L337" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="337"></td>
          <td id="LC337" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">        T : (sparse) array-like, shape = [n_samples, n_classes]</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L338" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="338"></td>
          <td id="LC338" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">            Returns the probability of the sample for each class in the model,</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L339" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="339"></td>
          <td id="LC339" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">            where classes are ordered as they are in `self.classes_`.</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">Therefore, for multilabel problems, these classes return different types of results when calling <code class="notranslate">predict_proba</code>. It can introduce some issue, for example, implementing multilabel support for <a href="https://github.com/scikit-learn/scikit-learn/blob/bac89c253b35a8f1a3827389fbee0f5bebcbc985/sklearn/ensemble/voting_classifier.py#L36"><code class="notranslate">VotingClassifier</code></a>.</p>
<p dir="auto">Right now, the content of <code class="notranslate">classes_</code> and the shape of the output of <code class="notranslate">predict_proba</code> and <code class="notranslate">decision_function</code> are inconsistent between estimators.<br>
If an <a href="http://scikit-learn.org/dev/modules/multiclass.html#multiclass-and-multilabel-algorithms" rel="nofollow">estimator supports</a> multioutput multiclass, <code class="notranslate">classes_</code> will be <code class="notranslate">[[0, 1]] * n_outputs</code> and <code class="notranslate">predict_proba</code> will return an object array of length <code class="notranslate">n_outputs</code> where each is <code class="notranslate">(n_samples, 2)</code>.<br>
If the estimator supports multi-label classification, but not multioutput multiclass, <code class="notranslate">classes_</code> will be <code class="notranslate">np.arange(n_outputs)</code> and <code class="notranslate">predict_proba</code> will be <code class="notranslate">(n_samples, n_outputs)</code>.</p>
<p dir="auto">That leads to issues such as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="223399887" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/8773" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/8773/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/8773">#8773</a>, but also runs counter to the sklearn promise of a consistent API.<br>
Given that even basic API like the <code class="notranslate">score</code> method is broken on multioutput multiclass (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="244101623" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/9414" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/9414/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/9414">#9414</a>), I'm not sure it's worth keeping this maintenance burden.</p>
<p dir="auto">Alternatively we could detect in the multioutput multiclass classifiers that a problem is actually multilabel and use the appropriate shapes for that.</p>
<p dir="auto">Either way, it's an incompatible change that's tricky to do with a deprecation cycle :-/</p>