Get startedGet started for free

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.

This exercise is part of the course

Analyzing IoT Data in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

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

# Fit the pipeline
____.____(____, ____)
Edit and Run Code