Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Creating a Pipeline | Section
Machine Learning Foundations with Scikit-Learn
Seção 1. Capítulo 20
single

single

bookChallenge: Creating a Pipeline

Deslize para mostrar o menu

Use the original penguins.csv: first remove the two rows with insufficient data. Build one preprocessing pipeline that performs encoding, imputing, and scaling.

Only 'sex' and 'island' should be encoded, so use a ColumnTransformer. After that, apply SimpleImputer and StandardScaler to all features.

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

Tarefa

Deslize para começar a programar

  1. Import make_pipeline.
  2. Create ct using OneHotEncoder for 'sex' and 'island', with remainder='passthrough'.
  3. Build a pipeline: ctSimpleImputer('most_frequent')StandardScaler.
  4. Transform X and store the result in X_transformed.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 20
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

some-alt