适合决策森林的数据
如果您拥有表格式数据集(可在电子表格、csv 文件或数据库表中表示的数据),则决策森林最有效。表格数据是最常见的数据格式之一,决策森林应该是建模的首选解决方案。
表 1. 表格数据集示例。
腿数 |
眼睛数量 |
重量(磅) |
品种(标签) |
2 | 2 | 12 | 企鹅 |
8 | 6 | 0.1 | 蜘蛛 |
4 | 2 | 44 | 狗 |
… | … | … | … |
与神经网络不同,决策森林本身会使用模型表格数据。开发决策森林时,您无需执行如下任务:
- 执行特征归一化或独热编码等预处理。
- 执行输入(例如,将缺失值替换为
-1
)。
不过,决策森林并不适合直接使用非表格式数据(也称为非结构化数据),例如图片或文本。是的,这种限制确实存在,但神经网络通常可以更好地处理非结构化数据。
决策森林是高效采样的。也就是说,决策森林非常适合在小型数据集或特征数 / 样本数比例较高(可能大于 1)的数据集上进行训练。与所有机器学习模型一样,尽管决策森林具有良好的样本效率,但在拥有大量可用数据时,决策森林的效果最佳。
决策森林的推断速度通常比同类神经网络快。例如,在中型 CPU 上,中型决策森林在几微秒内运行推断。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2022-09-26。
[null,null,["最后更新时间 (UTC):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."]]],[]]