開始使用免費開始

正規化基本清單資料

既然你已經了解正規化,來試著正規化一些資料吧。goals_for 是某支足球隊在最近 10 場比賽中的進球數清單。請使用 whiten() 函式將這些資料標準化。

本練習屬於課程

Python 中的叢集分析

檢視課程

練習說明

  • 匯入 whiten 函式。
  • 使用 whiten() 函式將資料標準化。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Import the whiten function
from scipy.cluster.vq import ____

goals_for = [4,3,2,3,1,1,2,0,1,4]

# Use the whiten() function to standardize the data
scaled_data = ____(____)
print(scaled_data)
編輯並執行程式碼