8000 DOC accelerate plot_kernel_ridge_regression.py (#21791) · scikit-learn/scikit-learn@257e0a2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 257e0a2

Browse files
authored
DOC accelerate plot_kernel_ridge_regression.py (#21791)
1 parent a5c90f8 commit 257e0a2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/miscellaneous/plot_kernel_ridge_regression.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
from sklearn.kernel_ridge import KernelRidge
4646
import matplotlib.pyplot as plt
4747

48-
rng = np.random.RandomState(0)
48+
rng = np.random.RandomState(42)
4949

5050
# #############################################################################
5151
# Generate sample data
@@ -128,10 +128,10 @@
128128
X = 5 * rng.rand(10000, 1)
129129
y = np.sin(X).ravel()
130130
y[::5] += 3 * (0.5 - rng.rand(X.shape[0] // 5))
131-
sizes = np.logspace(1, 4, 7).astype(int)
131+
sizes = np.logspace(1, 3.8, 7).astype(int)
132132
for name, estimator in {
133-
"KRR": KernelRidge(kernel="rbf", alpha=0.1, gamma=10),
134-
"SVR": SVR(kernel="rbf", C=1e1, gamma=10),
133+
"KRR": KernelRidge(kernel="rbf", alpha=0.01, gamma=10),
134+
"SVR": SVR(kernel="rbf", C=1e2, gamma=10),
135135
}.items():
136136
train_time = []
137137
test_time = []

0 commit comments

Comments
 (0)
0