의사결정 포레스트용 적절한 데이터
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
결정 트리는 표 형식의 데이터 세트 (스프레드시트, CSV 파일 또는 데이터베이스 테이블에 표시할 수 있는 데이터)가 있는 경우에 가장 효과적입니다. 표 형식 데이터는 가장 일반적인 데이터 형식 중 하나이며, 결정 트리는 이를 모델링하는 데 사용하는 '기본' 솔루션이어야 합니다.
표 1. 표 형식 데이터 세트의 예시입니다.
구간 수 |
눈 수 |
체중 (lbs) |
종 (라벨) |
2 | 2 | 12 | 펭귄 |
8 | 6 | 0.1 | 거미 |
4 | 2 | 44 | 개 |
… | … | … | … |
결정 트리는 신경망과 달리 모델 표 형식 데이터를 기본적으로 사용합니다.
결정 트리를 개발할 때 다음과 같은 작업을 할 필요가 없습니다.
- 특성 정규화 또는 원-핫 인코딩과 같은 사전 처리를 실행합니다.
- 보간을 실행합니다 (예: 누락된 값을
-1
로 바꾸기).
그러나 결정 트리는 이미지나 텍스트와 같은 표 형식이 아닌 데이터 (비정형 데이터라고도 함)를 직접 소비하는 데는 적합하지 않습니다. 예, 이 제한사항을 해결하는 방법이 있지만 일반적으로 신경망이 비정형 데이터를 더 잘 처리합니다.
의사결정 포레스트는 샘플이 효율적입니다. 즉, 의사결정 트리는 소규모 데이터 세트 또는 특성 수 / 예시 수의 비율이 높은 (1보다 클 수 있음) 데이터 세트에서 학습하는 데 적합합니다. 결정 트리는 모든 머신러닝 모델과 마찬가지로 샘플 효율적이지만, 사용할 수 있는 데이터가 많을 때 가장 효과적입니다.
결정 트리는 일반적으로 비슷한 신경망보다 빠르게 추론합니다. 예를 들어 중형 크기의 결정 포레스트는 최신 CPU에서 수 마이크로초 내에 추론을 실행합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 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."]]