Decision tree learning pros and cons

Advantages:

  • Easy to understand and interpret, perfect for visual representation. This is an example of a white box model, which closely mimics the human decision-making process.
  • Can work with numerical and categorical features.
  • Requires little data preprocessing: no need for one-hot encoding, dummy variables, and so on.
  • Non-parametric model: no assumptions about the shape of data.
  • Fast for inference.
  • Feature selection happens automatically: unimportant features will not influence the result. The presence of features that depend on each other (multicollinearity) also doesn't affect the quality.

Disadvantages:

  • It tends to overfit. This usually can be mitigated in one of three ways:
    • Limiting tree depth ...

Get Machine Learning with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.