Small typo in M3.02 exercice

Hi n_iter = 20 is missing to set the RandomizedSearchCV :

in the exercice :

Use a RandomizedSearchCV to find the best set of hyperparameters by tuning the following parameters of the model :

in the solution :

Use RandomizedSearchCV with n_iter=20 to find the best set of hyperparameters by tuning the following parameters of the model :

True. I made the changes in FIX add n_iter in question exercise · INRIA/scikit-learn-mooc@2576b76 · GitHub

Synchronizing the notebook in FUN will show the change.

Thanks

I am trying to trouble shoot for M3.2 excercise. In general I get a ‘‘value error’’ for the code;

model_random_search.fit(data_train, target_train)

My preprocessor returns the following;

When i run all the code, the way it is;
No plot is returned.

Hi nanfuka,
It’s very hard to tell since you do not show completly your code in the screen captures you put in your threads.
But I think I can guess that you did a mistake in the definition of your preprocessor since i do not see a ‘(’ before ‘cat_processor’ in your picture.

The correct preprocessor is something like:

preprocessor = ColumnTransformer([
    ('cat-preprocessor', categorical_preprocessor, categorical_columns), ('num_preprocessor', numerical_preprocessor, numerical_columns )])

but if I’m guessing correctly you used:

preprocessor = ColumnTransformer([
    'cat-preprocessor', categorical_preprocessor, categorical_columns, 'num_preprocessor', numerical_preprocessor, numerical_columns ])

that s why you have that message after executing the line 141.

P.S. :

  1. to present code use MarkDown :
    ```
    copy paste your code here
    ```
    or copy paste your code, select it and use Ctrl + E or the icon </>

  2. since this topic has been solved and your problem does not look to be completly related, it could have been great if you started a new topic to talk about your problem

Thank you. I will try this.