Skip to content

Commit

Permalink
DOC Fix UserWarning in plot_gpr_prior_posterior (scikit-learn#29380)
Browse files Browse the repository at this point in the history
  • Loading branch information
ovenpickled authored Jul 9, 2024
1 parent dddf2f0 commit 79afe99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/gaussian_process/plot_gpr_prior_posterior.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def plot_gpr_samples(gpr_model, n_samples, ax):
)

# %%
# Rational Quadradtic kernel
# ..........................
# Rational Quadratic kernel
# .........................
from sklearn.gaussian_process.kernels import RationalQuadratic

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

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

Expand Down

0 comments on commit 79afe99

Please sign in to comment.