walking through decision tree so that' how you walk through the results of decision tree it' just like going through flowchartand it' kind of awesome that an algorithm can produce this for you the algorithm itself is actually very simple let me explain how the algorithm works at each step of the decision tree flowchartwe find the attribute that we can partition our data on that minimizes the entropy of the data at the next step so we have resulting set of classificationsin this case hire or don' hireand we want to choose the attribute decision at that step that will minimize the entropy at the next step at each step we want to make all of the remaining choices result in either as many no hires or as many hire decisions as possible we want to make that data more and more uniform so as we work our way down the flowchartand we ultimately end up with set of candidates that are either all hires or all no hires so we can classify into yes/no decisions on decision tree so we just walk down the treeminimize entropy at each step by choosing the right attribute to decide onand we keep on going until we run out there' fancy name for this algorithm it' called id (iterative dichotomiser it is what' known as greedy algorithm so as it goes down the treeit just picks the attribute that will minimize entropy at that point now that might not actually result in an optimal tree that minimizes the number of choices that you have to makebut it will result in tree that worksgiven the data that you gave it random forests technique now one problem with decision trees is that they are very prone to overfittingso you can end up with decision tree that works beautifully for the data that you trained it onbut it might not be that great for actually predicting the correct classification for new people that it hasn' seen before decision trees are all about arriving at the right decision for the training data that you gave itbut maybe you didn' really take into account the right attributesmaybe you didn' give it enough of representative sample of people to learn from this can result in real problems so to combat this issuewe use technique called random forestswhere the idea is that we sample the data that we train onin different waysfor multiple different decision trees each decision tree takes different random sample from our set of training data and constructs tree from it then each resulting tree can vote on the right result