QuestionQ125

VerifiedModel Development

A data scientist is trying to tune a logistic regression model, logistic, with scikit-learn. They want to define a search space for two hyperparameters and have the tuning process randomly choose values for each evaluation.

They try to run the following code block, but it does not achieve the intended result:

Question Image

Which of the following changes can the data scientist make to achieve the task?

Explanation

RandomizedSearchCV samples a fixed number of candidate parameter settings from supplied distributions or lists. It accepts a distribution for C, discrete penalty choices, and random_state for reproducible random sampling. GridSearchCV instead exhaustively evaluates a parameter grid and does not use this randomized-search interface.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!