セクション 1. 章 20
single
Challenge: Creating a Pipeline
メニューを表示するにはスワイプしてください
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.
タスク
スワイプしてコーディングを開始
- 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.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 1. 章 20
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください