# TreeDecision

Decision Trees are a type of Supervised Machine Learning (that is you explain what the input is and what the corresponding output is in the training data) where the data is continuously split according to a certain parameter. The tree can be explained by two entities, namely decision nodes and leaves. The leaves are the decisions or the final outcomes. And the decision nodes are where the data is split.

![](https://4080037514-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lj1MxE3MGwQeOj0y5eS%2F-Lj1MzbYxniTqbLrAR6z%2F-Lj1NWGEO6Vop11idzue%2FDecision-Trees-modified-1.png?generation=1562334342186416\&alt=media)

An example of a decision tree can be explained using above binary tree. Let’s say you want to predict whether a person is fit given their information like age, eating habit, and physical activity, etc. The decision nodes here are questions like ‘What’s the age?’, ‘Does he exercise?’, ‘Does he eat a lot of pizzas’? And the leaves, which are outcomes like either ‘fit’, or ‘unfit’. In this case this was a binary classification problem (a yes no type problem).

There are two main types of Decision Trees:

1.  **Classification trees**

    &#x20;(Yes/No types)

What we’ve seen above is an example of classification tree, where the outcome was a variable like ‘fit’ or ‘unfit’. Here the decision variable is **Categorical**.

1.  **Regression trees**

    &#x20;(Continuous data types)

Here the decision or the outcome variable is **Continuous**, e.g. a number like 123.
