8000 FIX make CalibratedClassifierCV deterministic by default. · scikit-learn/scikit-learn@2b66687 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2b66687

Browse files
committed
FIX make CalibratedClassifierCV deterministic by default.
1 parent bfef25a commit 2b66687

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sklearn/calibration.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ def fit(self, X, y, sample_weight=None):
124124

125125
self.calibrated_classifiers_ = []
126126
if self.base_estimator is None:
127-
base_estimator = LinearSVC()
127+
# we want all classifiers that don't expose a random_state
128+
# to be deterministic (and we don't want to expose this one).
129+
base_estimator = LinearSVC(random_state=0)
128130
else:
129131
base_estimator = self.base_estimator
130132

0 commit comments

Comments
 (0)
0