為決策樹系提供適當的資料
如果您有表格式資料集 (可能是您在試算表、CSV 檔案或資料庫資料表中所代表的資料),決策資料庫就能發揮最佳效用。表格資料是最常見的資料格式之一,而決策樹系應為「模擬」的解決方案。
表 1. 表格式資料集範例。
路段數量 |
眼睛數量 |
體重 (磅) |
物種 (標籤) |
2 | 2 | 12 | 企鵝 |
8 | 6 | 0.1 | 蜘蛛 |
4 | 2 | 44 | 狗 |
⋯⋯ | ⋯⋯ | ⋯⋯ | ⋯⋯ |
與類神經網路不同,決策樹會以原生方式使用模型表格資料。開發決策樹系時,您無須執行下列工作:
- 執行預先處理作業,例如特徵正規化或 One-hot 編碼。
- 執行估算作業 (例如將缺少的值替換為
-1
)。
不過,決策森林不適合用來直接使用非表格型資料 (也稱為非結構化資料),例如圖片或文字。沒錯,這項限制的解決方法確實存在,但類神經網路通常能夠更妥善地處理非結構化資料。
Decision Forest 的樣本效率極佳。也就是說,決策森林相當適合用於小型資料集的訓練作業,或是針對特徵數量和範例數的比例較高的資料集 (可能大於 1) 提供訓練。儘管決策樹係是有效的樣本,就像所有機器學習模型一樣,但由於有大量資料可用,決策樹的成效最佳。
Decision Forest 的推論速度通常比同等類神經網路更快。舉例來說,中型決策森林在現代 CPU 上應以微秒為單位執行推論。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2022-09-26 (世界標準時間)。
[null,null,["上次更新時間:2022-09-26 (世界標準時間)。"],[[["Decision forests are highly effective for modeling tabular data, making them a primary choice for datasets commonly found in spreadsheets, CSV files, or databases."],["Unlike neural networks, decision forests directly handle tabular data without requiring preprocessing steps like feature normalization or imputation."],["While decision forests can be adapted for non-tabular data like images or text, neural networks are generally better suited for such data types."],["Decision forests are sample efficient, performing well even with small datasets or those with a high feature-to-example ratio, but still benefit from larger datasets."],["Decision forests offer faster inference speeds compared to neural networks, typically completing predictions within microseconds on modern CPUs."]]],[]]