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

Scaling II

You'll now apply a scaler to the dataset, which is available for you as environment.

Remember that Scaling helps the algorithm converge faster, and avoids having one dominant feature heavily influence the outcomes.

Bu egzersiz

Analyzing IoT Data in Python

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

Egzersiz talimatları

  • Initialize a StandardScaler and store it as sc.
  • Fit the scaler to environment.
  • Scale environment and store the result as environ_scaled.
  • Convert the scaled data back to a DataFrame, using the same columns and index than the original DataFrame.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Initialize StandardScaler
sc = ____()

# Fit the scaler
sc.fit(____)

# Transform the data
environ_scaled = ____.____(____)

# Convert scaled data to DataFrame
environ_scaled = pd.DataFrame(____, 
                              columns=____, 
                              index=____)
print(environ_scaled.head())
plot_unscaled_scaled(environment, environ_scaled)
Kodu Düzenle ve Çalıştır