Skip to content

Commit 79afe99

Browse files
authored
DOC Fix UserWarning in plot_gpr_prior_posterior (scikit-learn#29380)
1 parent dddf2f0 commit 79afe99

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/gaussian_process/plot_gpr_prior_posterior.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ def plot_gpr_samples(gpr_model, n_samples, ax):
126126
)
127127

128128
# %%
129-
# Rational Quadradtic kernel
130-
# ..........................
129+
# Rational Quadratic kernel
130+
# .........................
131131
from sklearn.gaussian_process.kernels import RationalQuadratic
132132

133133
kernel = 1.0 * RationalQuadratic(length_scale=1.0, alpha=0.1, alpha_bounds=(1e-5, 1e15))
@@ -200,7 +200,7 @@ def plot_gpr_samples(gpr_model, n_samples, ax):
200200
kernel = ConstantKernel(0.1, (0.01, 10.0)) * (
201201
DotProduct(sigma_0=1.0, sigma_0_bounds=(0.1, 10.0)) ** 2
202202
)
203-
gpr = GaussianProcessRegressor(kernel=kernel, random_state=0)
203+
gpr = GaussianProcessRegressor(kernel=kernel, random_state=0, normalize_y=True)
204204

205205
fig, axs = plt.subplots(nrows=2, sharex=True, sharey=True, figsize=(10, 8))
206206

0 commit comments

Comments
 (0)