開始使用免費開始

使用組合篩選器進行特徵選擇

你已經建立了零變異與遺漏值篩選器,現在就把它們用在 house_sales_df 上,降低其維度吧。你會先把這些篩選器結合,接著用組合後的篩選器,從 house_sales_df 中移除低資訊的特徵。

zero_var_filterna_filter 物件已可供你使用,且已為你載入 tidyverse 套件。

本練習屬於課程

R 的降維

檢視課程

練習說明

  • zero_var_filterna_filter 結合為 low_info_filter
  • 套用 low_info_filter,以降低 house_sales_df 的維度。
  • 顯示降維後的 house_sales_df 資料集的 5 列資料。

動手互動練習

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

# Combine the two filters
___ <- ___(___, ___)

# Apply the filter
house_sales_filtered_df <- ___ %>% 
  ___(-all_of(___))

# Display five rows of the reduced data set
house_sales_filtered_df %>%
  ___(___)
編輯並執行程式碼