デシジョン フォレストに適したデータ
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
決定木は、表形式のデータセット(スプレッドシート、CSV ファイル、データベース テーブルで表されるデータ)がある場合に最も効果的です。表形式のデータは最も一般的なデータ形式の一つであり、意思決定木はそれをモデリングするための「頼りになる」ソリューションです。
表 1. 表形式データセットの例。
区間の数 |
目の数 |
重量(ポンド) |
種(ラベル) |
2 | 2 | 12 | ペンギン |
8 | 6 | 0.1 | クモ |
4 | 2 | 44 | 犬 |
… | … | … | … |
ニューラル ネットワークとは異なり、ディシジョン フォレストはモデルの表形式データをネイティブに使用します。ディシジョン フォレストを開発する際に、次のようなタスクを行う必要はありません。
- 特徴の正規化やワンホット エンコーディングなどの前処理を行います。
- 補完を実行します(欠損値を
-1
に置き換えるなど)。
ただし、決定木は、画像やテキストなどの表形式以外のデータ(非構造化データ)を直接使用するには適していません。はい。この制限を回避する方法はありますが、通常、ニューラル ネットワークは非構造化データをより適切に処理します。
デシジョン フォレストはサンプル効率が高いため、つまり、決定木は、小規模なデータセットや、特徴数 / サンプル数の比率が高い(1 より大きい場合もある)データセットでのトレーニングに適しています。決定木はサンプル効率が高いものの、他の ML モデルと同様に、大量のデータが利用可能な場合に最も高いパフォーマンスを発揮します。
通常、決定木は同等のニューラル ネットワークよりも高速に推論します。たとえば、中程度のサイズのディシジョン フォレストは、最新の CPU で数マイクロ秒で推論を実行します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-27 UTC。
[null,null,["最終更新日 2025-07-27 UTC。"],[[["\u003cp\u003eDecision forests are highly effective for modeling tabular data, making them a primary choice for datasets commonly found in spreadsheets, CSV files, or databases.\u003c/p\u003e\n"],["\u003cp\u003eUnlike neural networks, decision forests directly handle tabular data without requiring preprocessing steps like feature normalization or imputation.\u003c/p\u003e\n"],["\u003cp\u003eWhile decision forests can be adapted for non-tabular data like images or text, neural networks are generally better suited for such data types.\u003c/p\u003e\n"],["\u003cp\u003eDecision 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.\u003c/p\u003e\n"],["\u003cp\u003eDecision forests offer faster inference speeds compared to neural networks, typically completing predictions within microseconds on modern CPUs.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\nDecision forests are most effective when you have a tabular dataset (data you\nmight represent in a spreadsheet, csv file, or database table). Tabular data is\none of the most common data formats, and decision forests should be your \"go-to\"\nsolution for modeling it.\n\n**Table 1. An example of a tabular dataset.**\n\n| Number of legs | Number of eyes | Weight (lbs) | Species (label) |\n|----------------|----------------|--------------|-----------------|\n| 2 | 2 | 12 | Penguin |\n| 8 | 6 | 0.1 | Spider |\n| 4 | 2 | 44 | Dog |\n| ... | ... | ... | ... |\n\nUnlike neural networks, decision forests natively consume model tabular data.\nWhen developing decision forests, you don't have to do tasks like the following:\n\n- Perform preprocessing like feature normalization or one-hot encoding.\n- Perform imputation (for example, replacing a missing value with `-1`).\n\nHowever, decision forests are not well suited to directly consume non-tabular\ndata (also called unstructured data), such as images or text. Yes, workarounds\nfor this limitation do exist, but neural networks generally handle unstructured\ndata better.\n\nPerformance\n\nDecision forests are sample efficient. That is, decision forests are well suited\nfor training on small datasets, or on datasets where the ratio of number of\nfeatures / number of examples is high (possibly greater than 1). Even though\ndecision forests are sample efficient, like all machine learning models,\ndecision forests perform best when lots of data is available.\n\nDecision forests typically infer faster than comparable neural\nnetworks. For example, a medium-size decision forest runs inference in a few\nmicroseconds on a modern CPU."]]