視覺化雜湊結果
檢視資料的視覺化呈現常常很有幫助。已為你載入含有代表 EducationField 因子的雜湊索引的 baked tibble。你可以將這個資料集的全部或部分轉成矩陣來探索,以找出模式或偵測潛在錯誤。
plot.matrix 套件已經幫你載入。
本練習屬於課程
R 的特徵工程
練習說明
- 將
bakedtibble轉換為矩陣。 - 繪製
attrition_hash矩陣的圖。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Convert the baked tibble to a matrix
attrition_hash <- ___(baked)[1:50,]
# Plot the attrTheTition_hash matrix
___(attrition_hash,
col = c("white","steelblue"),
key = NULL,
border = NA)