Rename svm_clf to svm_reg in chapter 5 exercise, fixes #120
parent
123a9a1b38
commit
c2d5a87137
|
@ -2481,13 +2481,13 @@
|
|||
"from sklearn.model_selection import RandomizedSearchCV\n",
|
||||
"from scipy.stats import loguniform, uniform\n",
|
||||
"\n",
|
||||
"svm_clf = make_pipeline(StandardScaler(), SVR())\n",
|
||||
"svm_reg = make_pipeline(StandardScaler(), SVR())\n",
|
||||
"\n",
|
||||
"param_distrib = {\n",
|
||||
" \"svr__gamma\": loguniform(0.001, 0.1),\n",
|
||||
" \"svr__C\": uniform(1, 10)\n",
|
||||
"}\n",
|
||||
"rnd_search_cv = RandomizedSearchCV(svm_clf, param_distrib,\n",
|
||||
"rnd_search_cv = RandomizedSearchCV(svm_reg, param_distrib,\n",
|
||||
" n_iter=100, cv=3, random_state=42)\n",
|
||||
"rnd_search_cv.fit(X_train[:2000], y_train[:2000])"
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue