Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Creating a Pipeline Challenge | Pipelines
ML Introduction with scikit-learn
course content

Зміст курсу

ML Introduction with scikit-learn

ML Introduction with scikit-learn

1. Machine Learning Concepts
2. Preprocessing Data with Scikit-learn
3. Pipelines
4. Modeling

Creating a Pipeline Challenge

In this challenge, you need to put all the preprocessing steps we did together into one pipeline.
The dataset is the initial penguins.csv file we started from.
The first step is to remove two useless rows.
Then you will have to create a pipeline containing Encoding, Imputing, and Scaling.

You only need to encode two columns, 'sex' and 'island'. Since you do not want to encode the whole X, you must use ColumnTransformer. Then apply the SimpleImputer and StandardScaler to the entire X.

Here is a reminder of the make_column_transformer() and make_pipeline() functions you will use.

Завдання

  1. Import the correct function for making a pipeline.
  2. Make a ColumnTransformer with the OneHotEncoder applied only to columns 'sex' and 'island'.
  3. Set a remainder argument of make_column_transformer so that all the numerical columns remain untouched.
  4. Make a pipeline containing ct you just created, SimpleImputer with the strategy of 'most_frequent' and a StandardScaler as a last step.
  5. Transform the X using the pipe you created.

Завдання

  1. Import the correct function for making a pipeline.
  2. Make a ColumnTransformer with the OneHotEncoder applied only to columns 'sex' and 'island'.
  3. Set a remainder argument of make_column_transformer so that all the numerical columns remain untouched.
  4. Make a pipeline containing ct you just created, SimpleImputer with the strategy of 'most_frequent' and a StandardScaler as a last step.
  5. Transform the X using the pipe you created.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 4
toggle bottom row

Creating a Pipeline Challenge

In this challenge, you need to put all the preprocessing steps we did together into one pipeline.
The dataset is the initial penguins.csv file we started from.
The first step is to remove two useless rows.
Then you will have to create a pipeline containing Encoding, Imputing, and Scaling.

You only need to encode two columns, 'sex' and 'island'. Since you do not want to encode the whole X, you must use ColumnTransformer. Then apply the SimpleImputer and StandardScaler to the entire X.

Here is a reminder of the make_column_transformer() and make_pipeline() functions you will use.

Завдання

  1. Import the correct function for making a pipeline.
  2. Make a ColumnTransformer with the OneHotEncoder applied only to columns 'sex' and 'island'.
  3. Set a remainder argument of make_column_transformer so that all the numerical columns remain untouched.
  4. Make a pipeline containing ct you just created, SimpleImputer with the strategy of 'most_frequent' and a StandardScaler as a last step.
  5. Transform the X using the pipe you created.

Завдання

  1. Import the correct function for making a pipeline.
  2. Make a ColumnTransformer with the OneHotEncoder applied only to columns 'sex' and 'island'.
  3. Set a remainder argument of make_column_transformer so that all the numerical columns remain untouched.
  4. Make a pipeline containing ct you just created, SimpleImputer with the strategy of 'most_frequent' and a StandardScaler as a last step.
  5. Transform the X using the pipe you created.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 4
toggle bottom row

Creating a Pipeline Challenge

In this challenge, you need to put all the preprocessing steps we did together into one pipeline.
The dataset is the initial penguins.csv file we started from.
The first step is to remove two useless rows.
Then you will have to create a pipeline containing Encoding, Imputing, and Scaling.

You only need to encode two columns, 'sex' and 'island'. Since you do not want to encode the whole X, you must use ColumnTransformer. Then apply the SimpleImputer and StandardScaler to the entire X.

Here is a reminder of the make_column_transformer() and make_pipeline() functions you will use.

Завдання

  1. Import the correct function for making a pipeline.
  2. Make a ColumnTransformer with the OneHotEncoder applied only to columns 'sex' and 'island'.
  3. Set a remainder argument of make_column_transformer so that all the numerical columns remain untouched.
  4. Make a pipeline containing ct you just created, SimpleImputer with the strategy of 'most_frequent' and a StandardScaler as a last step.
  5. Transform the X using the pipe you created.

Завдання

  1. Import the correct function for making a pipeline.
  2. Make a ColumnTransformer with the OneHotEncoder applied only to columns 'sex' and 'island'.
  3. Set a remainder argument of make_column_transformer so that all the numerical columns remain untouched.
  4. Make a pipeline containing ct you just created, SimpleImputer with the strategy of 'most_frequent' and a StandardScaler as a last step.
  5. Transform the X using the pipe you created.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

In this challenge, you need to put all the preprocessing steps we did together into one pipeline.
The dataset is the initial penguins.csv file we started from.
The first step is to remove two useless rows.
Then you will have to create a pipeline containing Encoding, Imputing, and Scaling.

You only need to encode two columns, 'sex' and 'island'. Since you do not want to encode the whole X, you must use ColumnTransformer. Then apply the SimpleImputer and StandardScaler to the entire X.

Here is a reminder of the make_column_transformer() and make_pipeline() functions you will use.

Завдання

  1. Import the correct function for making a pipeline.
  2. Make a ColumnTransformer with the OneHotEncoder applied only to columns 'sex' and 'island'.
  3. Set a remainder argument of make_column_transformer so that all the numerical columns remain untouched.
  4. Make a pipeline containing ct you just created, SimpleImputer with the strategy of 'most_frequent' and a StandardScaler as a last step.
  5. Transform the X using the pipe you created.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 3. Розділ 4
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt