8000 #7752 self.rng to private -> self.rng_ · tomron/scikit-learn@133e945 · GitHub
[go: up one dir, main page]

Skip to content

Commit 133e945

Browse files
committed
scikit-learn#7752 self.rng to private -> self.rng_
1 parent 8570622 commit 133e945

File tree

1 file changed

+2
-2
lines changed
  • sklearn/gaussian_process

1 file changed

+2
-2
lines changed

sklearn/gaussian_process/gpr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def fit(self, X, y):
161161
else:
162162
self.kernel_ = clone(self.kernel)
163163

164-
self.rng = check_random_state(self.random_state)
164+
self.rng_ = check_random_state(self.random_state)
165165

166166
X, y = check_X_y(X, y, multi_output=True, y_numeric=True)
167167

@@ -211,7 +211,7 @@ def obj_func(theta, eval_gradient=True):
211211
bounds = self.kernel_.bounds
212212
for iteration in range(self.n_restarts_optimizer):
213213
theta_initial = \
214-
self.rng.uniform(bounds[:, 0], bounds[:, 1])
214+
self.rng_.uniform(bounds[:, 0], bounds[:, 1])
215215
optima.append(
216216
self._constrained_optimization(obj_func, theta_initial,
217217
bounds))

0 commit comments

Comments
 (0)
0