<h4 dir="auto">Describe the workflow you want to enable</h4>
<p dir="auto">Ability to plot the PR curve given <code class="notranslate">probas_pred</code> instead of <code class="notranslate">estimator, X</code>.</p>
<h4 dir="auto">Describe your proposed solution</h4>
<p dir="auto"><code class="notranslate">plot_precision_recall_curve()</code> should accept either <code class="notranslate">estimator, X</code> or <code class="notranslate">probas_pred</code>.</p>
<h4 dir="auto">Describe alternatives you've considered, if relevant</h4>
<p dir="auto">Alternatively, <code class="notranslate">precision_recall_curve()</code> could plot the PR curve if keyword argument <code class="notranslate">plot=True</code>.</p>
<h4 dir="auto">Additional context</h4>
<p dir="auto">The signature of <code class="notranslate">plot_confusion_matrix</code> is currently:</p>
<p dir="auto"><code class="notranslate">sklearn.metrics.plot_confusion_matrix(estimator, X, y_true, labels=None, sample_weight=None, normalize=None, display_labels=None, include_values=True, xticks_rotation='horizontal', values_format=None, cmap='viridis', ax=None)</code></p>
<p dir="auto">The function takes an estimator and raw data and can not be used with already predicted labels. This has some downsides:</p>
<ul dir="auto">
<li>If a confusion matrix should be plotted but the predictions should also be used elsewhere (e.g. calculating accuracy_score) the estimation has to be performed several times. That takes longer and can result in different values if the estimator is randomized.</li>
<li>If no estimator is available (e.g. predictions loaded from a file) the plot can not be used at all.</li>
</ul>
<p dir="auto">Suggestion: allow passing predicted labels <code class="notranslate">y_pred</code> to <code class="notranslate">plot_confusion_matrix</code> that will be used instead of <code class="notranslate">estimator</code> and <code class="notranslate">X</code>. In my opinion the cleanest solution would be to remove the prediction step from the function and use a signature similar to that of <code class="notranslate">accuracy_score</code>, e.g. <code class="notranslate">(y_true, y_pred, labels=None, sample_weight=None, ...)</code>. However in order to maintain backwards compatibility, <code class="notranslate">y_pred</code> can be added as an optional keyword argument.</p>
<p dir="auto">TODO:</p>
<ul dir="auto">
<li>
<p dir="auto">Introduce the class methods for the currently existing plots:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">ConfusionMatrixDisplay</code> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="715485974" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/18543" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/18543/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/18543">#18543</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">PrecisionRecallDisplay</code> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="946907798" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/20552" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/20552/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/20552">#20552</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">RocCurveDisplay</code> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="948050789" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/20569" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/20569/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/20569">#20569</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">DetCurveDisplay</code> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="794129835" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/19278" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/19278/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/19278">#19278</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">PartialDependenceDisplay</code>. For this one, we don't want to introduce the <code class="notranslate">from_predictions</code> classmethod because it would not make sense, we only want <code class="notranslate">from_estimator</code>.</li>
</ul>
</li>
<li>
<p dir="auto">For all Display listed above, deprecate their corresponding <code class="notranslate">plot_...</code> function. We don't need to deprecate <code class="notranslate">plot_det_curve</code> because it hasn't been released yet, we can just remove it.</p>
</li>
<li>
<p dir="auto">for new PRs like <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="630742675" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/17443" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/17443/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/17443">#17443</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="667059094" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/18020" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/18020/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/18020">#18020</a> we can implement the class methods right away instead of introducing a <code class="notranslate">plot</code> function.</p>
</li>
</ul>