始める無料で始める

Store Pipeline

You'll now create the Pipeline again, but directly, skipping the step of initializing the StandardScaler and LogisticRegression as a variable. Instead, you will do the initialization as part of the Pipeline creation.

You'll then store the model for further use.

The data is available as X_train, with the labels as y_train.

StandardScaler, LogisticRegression and Pipeline have been imported for you.

この演習はコースの一部です

Analyzing IoT Data in Python

コースを見る

実践的なインタラクティブ演習

このサンプルコードを完成させて、この演習に挑戦してみましょう。

# Create Pipeline
pl = Pipeline([
        ("scale", ____),
        ("logreg", ____)
    ])

# Fit the pipeline
____.____(____, ____)
コードを編集して実行