In order to learn svm(support vector machine), we have to learn about what the Random Forest is.

**1. What is a decision tree**

A **decision tree** is a decision support tool that uses a tree-like graph or model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility. It is one way to display an algorithm.(from wiki)

**Two Types of decision tree**

1.Categorical Variable Decision Tree

2.Continuous Variable Decision Tree

**Example:-** Let’s say we have a problem to predict whether a customer will pay his renewal premium with an insurance company (yes/ no). Here we know that income of customer is a significant variable but insurance company does not have income details for all customers. Now, as we know this is an important variable, then we can build a decision tree to predict customer income based on occupation, product and various other variables. In this case, we are predicting values for continuous variable.

### Important Terminology related to Decision Trees

**Root Node**,** Splitting**,** Decision Node**,** Leaf/Terminal Node**:

**Pruning: **When we remove sub-nodes of a decision node, this process is called pruning. You can say opposite process of splitting.

**Branch / Sub-Tree**, **Parent and Child Node**

### Disadvantages

**Over fitting:**Over fitting is one of the most practical difficulty for decision tree models. This problem gets solved by setting constraints on model parameters and pruning (discussed in detailed below).**Not fit for continuous variables**: While working with continuous numerical variables, decision tree looses information when it categorizes variables in different categories.

## 2. Regression Trees vs Classification Trees