Machine Learning Project 5: Predict Salary using Decision Tree Regression
Today we will be looking at the one of the most popular regression models called Decision Tree.
#100DaysOfMLCode #100ProjectsInML
I will be solving the same problem about predicting salary of a new employee based on his position level.
I have solved the same problem in project 3 using Polynomial Regression — You can check it out here.
And the same problem has been solved in project 4 using Support Vector Regression — You can check that project here.
Let’s understand Decision Trees.
Decision tree regression model is Non Linear and a Non continuous model.
Below is a scatter plot which represents our dataset. It has 2 independent variables X1 and X2 and what we are trying to predict is a 3rd dependent variable y.
Now once we run the decision tree algorithm, the scatter plot will be split up into segments. Each one of these splits is called a leaf. The way the splits are made is based on the principle of information entropy. It is a mathematical concept and is quite complex. If…