Decision Tree in Machine Learning

Machine Learning is Fun! So are the algorithms.

Let’s suggest magazines for different people. Consider the data we have for recommending magazine. We have recorded age, gender and location of users and the type of magazine they read.

Now by our observation from this data, we can see people whose are less than 15 like to read Kids magazine. Let’s make a node and its decision. Here a graph is presented. Each rounded node referred to decision node. Edges of the graph denote the corresponding decisions. Each rectangle node represents decision taken by following that branch of the graph. 

So, we can say each person whose age less than or equal to 15 are likely to read Kids magazine. Now let’s handle the other branch where people are more than 15 years. Now our second observation, Male people like to read a Political magazine. We create the same decision node and branches for it.


That is great. Now move ahead with the people whose are greater than 15 years and Female. We still have one more information which we can utilize – Location. So, we can say people which are from the US are like to read Sports magazine otherwise they like Business magazine. Let’s form the node here. 

We classified each data point correctly. So, this is called Decision Tree. There may exist multiple ways to create a decision tree. Those can also give a correct prediction as per the available data.

Consider this tree

This also classifies the data correctly.


要查看或添加评论,请登录

Abhishek Vijayvargia的更多文章

  • Best Data Science Courses in India

    Best Data Science Courses in India

    India's tech scene is on fire, and the demand for data science skills is exploding. Businesses everywhere are…

    10 条评论
  • Software Engineer to Data Scientist

    Software Engineer to Data Scientist

    Transitioning from software engineering to data science is a career shift that many in the tech industry consider due…

    1 条评论

社区洞察

其他会员也浏览了