Seção 1. Capítulo 20
single
Challenge: 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
- Import
make_pipeline. - Create
ctusingOneHotEncoderfor'sex'and'island', withremainder='passthrough'. - Build a pipeline:
ct→SimpleImputer('most_frequent')→StandardScaler. - Transform
Xand store the result inX_transformed.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 20
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo