8000 [WIP] ENH Adds caching to multimetric scoring with a wrapper class by thomasjpfan · Pull Request #14261 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/whats_new/v0.22.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ Changelog
plot model scalability (see learning_curve example).
:pr:`13938` by :user:`Hadrien Reboul <H4dr1en>`.

- |Efficiency| Multimetric scoring now caches predictions to avoid repeated
calls. :pr:`14261` by `Thomas Fan`_.

:mod:`sklear 8000 n.pipeline`
.......................

Expand Down
4 changes: 4 additions & 0 deletions sklearn/ensemble/voting.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ def predict_proba(self):
"""
return self._predict_proba

@predict_proba.setter
def predict_proba(self, func):
self._predict_proba = func

def transform(self, X):
"""Return class labels or probabilities for X for each estimator.

Expand Down
8 changes: 8 additions & 0 deletions sklearn/linear_model/stochastic_gradient.py