Skip to content

Commit

Permalink
Rename svm_clf to svm_reg in chapter 5 exercise, fixes #120
Browse files Browse the repository at this point in the history
  • Loading branch information
ageron committed Jan 31, 2024
1 parent 123a9a1 commit c2d5a87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 05_support_vector_machines.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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])"
]
Expand Down

0 comments on commit c2d5a87

Please sign in to comment.