## Decision Tree Algorithm in Data Mining

Decision trees, and data mining are useful techniques these days.A decision tree is a hierarchical relationship diagram that is used to determine the answer to an overall question. It does this by asking a sequence of sub-questions related to that question. Each branch of the diagram represents a possible choice or answer to a specific sub-question. And each sub-question iteratively reduces the number of remaining choices, or answers, until only the correct one for the overall question, in that particular situation, remains.

Let’s look at an example. In the diagram above, the overall question is, ‘Is the weather good enough to go outside?’ This isn’t a simple question to answer. There are a number of factors to consider. Each bubble in the diagram represents a factor, or sub-question, and each line represents a choice or answer to the sub-question above.

So the first sub-question we ask is, ‘Is it windy?’ If it is, we go down the left of the diagram, if not, we go down the right. Let’s say it is windy. That takes us to the ‘What is the outlook?’ sub-question. If the answer is sunny, we go down the left, if overcast down the center, and if rainy, down the right. Let’s say that it is sunny, so we go down the left. Then the next sub-question is ‘What is the humidity?’. If the humidity is less than 80 percent, the answer to the overall question is ‘Yes’. And if the humidity is greater than 80 percent, the answer is ‘No.’