Skip to content

ml decision tree

ghdrako edited this page Aug 14, 2026 · 4 revisions

Compared to other models, decision trees have many advantages:

  • Features may be numeric or categorical: Samples can be split using either numerical features (by splitting a range) or categorical ones without us having to encode either.
  • Reduced need for data preparation: Decision splits are not sensitive to data ranges or size. Many other models (for example, neural networks) require data to be normalized to unit ranges.
  • Interpretability: As shown previously, it’s straightforward to interpret the predictions made by a tree. Interpretability is valuable in contexts where a prediction must be explained to decision-makers

disadvantages associated with decision trees:

  • Overfitting: Decision trees are very prone to overfitting. Setting the correct hyperparameters is essential when fitting decision trees. Overfitting in decision trees will be discussed in detail later.
  • Poor extrapolation: Decision trees are poor at extrapolation since their predictions are not continuous and are effectively bounded by the training data.
  • Unbalanced data: When fitting a tree on unbalanced data, the high-frequency classes dominate the predictions. Data needs to be prepared to remove imbalances.

Drzewa decyzyjne (ang. decision trees) stanowia wszechstrony algorytm uczenia maszynowego, służący zarówno do zadań klasyfikacji, jak i regresji. Sa też elementem składowym losowych lasów.

W ogólnym ujęciu głównym problem drzew decyzyjnych polega na ich całkiem dużej wariancji: małe zmiany w hiperparametrach lub danych mogą generować bardzo różne modele. Przeciwdziałaniem temu problemowi jest uśrednianie prognoz uzyskanych z wielu drzew co umożliwia znaczna redukcje wariancji. Taki zespół drzew nazywany jest lasem losowym (ang. random forest) i stanowi on jeden z najpotężniejszych współczesnych rodzajów modeli.

Test

Clone this wiki locally