Mantieni tutto organizzato con le raccolte Salva e classifica i contenuti in base alle tue preferenze.
Le foreste di alberi decisionali sono più efficaci quando hai un set di dati tabulare (dati che potresti rappresentare in un foglio di lavoro, un file CSV o una tabella di database). I dati tabulari sono uno dei formati di dati più comuni e le foreste di decisione dovrebbero essere la soluzione di riferimento per la loro definizione.
Tabella 1. Un esempio di set di dati tabulare.
Numero di tratti
Numero di occhi
Peso (lb)
Specie (etichetta)
2
2
12
Pinguino
8
6
0,1
Ragno
4
2
44
Cane
…
…
…
…
A differenza delle reti neurali, le foreste di alberi decisionali utilizzano in modo nativo i dati tabulari del modello. Quando sviluppi foreste di alberi decisionali, non devi svolgere attività come le seguenti:
Esegui la pre-elaborazione, ad esempio la normalizzazione delle caratteristiche o la codifica one-hot.
Esegui l'imputation (ad esempio, sostituendo un valore mancante con -1).
Tuttavia, le foreste di decisione non sono adatte all'utilizzo diretto di dati non tabulari (chiamati anche dati non strutturati), come immagini o testo. Sì, esistono soluzioni alternative per questa limitazione, ma in genere le reti neurali gestiscono meglio i dati non strutturati.
Prestazioni
Le foreste di alberi decisionali sono efficienti per i campioni. In altre parole, le foreste di decisione sono adatte per l'addestramento su set di dati di piccole dimensioni o su set di dati in cui il rapporto tra il numero di funzionalità e il numero di esempi è elevato (possibilmente maggiore di 1). Anche se le foreste di regressione sono efficienti per i campioni, come tutti i modelli di machine learning, le foreste di regressione hanno il rendimento migliore quando sono disponibili molti dati.
Le foreste di alberi decisionali in genere deducono più velocemente rispetto alle reti neurali paragonabili. Ad esempio, una foresta decisionale di medie dimensioni esegue l'inferenza in pochi microsecondi su una CPU moderna.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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."]]