開始使用免費開始

同時調整多個超參數

在這個練習中,你將練習同時調整多個超參數。這很重要,因為一個演算法的超參數通常會互相影響。因此,分別獨立調參通常不是建議的作法。

你會使用 Big Mart 銷售資料的樣本,調整 IForest 的 max_features 與 max_samples 參數。

IForest 和 airbnb_df 已經為你載入,itertools 的 product 函式也可使用。

本練習屬於課程

Python 中的異常偵測

檢視課程

動手互動練習

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

# Create two lists for max_features and max_samples
max_features = ____
max_samples = ____
scores = dict()
編輯並執行程式碼