BaşlayınÜcretsiz Başlayın

Model predictions

You're ready to use your model to predict values based on the test dataset, and inspect the results!

All necessary modules have been imported and the data is available as X_train, y_train, and X_test. Don't hesitate to refer to the slides if you don't remember how to initialize a Pipeline.

Bu egzersiz

Analyzing IoT Data in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Create a Pipeline as before, using a StandardScaler and a LogisticRegression, and name the steps "scale" and "logreg" respectively.
  • Fit the Pipeline to X_train and y_train.
  • Predict classes for X_test and store the result as predictions.
  • Print the resulting array.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Create Pipeline
pl = Pipeline([
        (____, ____),
  		 ____
    ])

# Fit the pipeline
____.____(____, ____)

# Predict classes
____ = ____.____(____)

# Print results
print(____)
Kodu Düzenle ve Çalıştır