Hi, in this section, we learned how to use RandomizedSearchCV
for hyperparameter tuning. But I didn’t figure out the optimal way to predict(using the best set of hyperparameters obtained from RandomizedSearchCV
)! I considered two ways:
-
After fitting
RandomizedSearchCV
on the training set, usebest_params_
to find the optimal set of params and use them in fitting the Regression model(i.e.) on the training dataset.(handy and not automatic) -
just use
RandomizedSearchCV.fit(data_train , target)
and thenRandomizedSearchCV.predict(data_test)
to obtain prediction using optimal set of hyperparameters.(I guess this is automatic way)
Which one is true?