Home » Machine Learning/Artificial Intelligence

Decision Trees in Machine learning

In this article, we are going to learn about the decision trees in Machine Learning, where are they used and its advantages over other algorithms.
Submitted by Basantjeet Das, on November 13, 2018

Decision Trees Algorithm

A decision tree is a tree-like structure or graph based on decisions and their possible consequences to a situation. In a decision tree, every node represents criteria or a parameter, and every branch directs to the outcome, and the leaf nodes depicting the final outcome (class labels).

What Decision trees do is, it solves the problems by framing a tree on the basis of decisions in a top-down manner from root to the leaf nodes, with each leaf node providing a classification to the problem. Each node corresponds to one of the possible answers to the test case or to another node forwarding to the solutions. For applying decision tree an algorithm should contain conditional statements only.

Decision trees are generally recursive in nature and are performed on every node of the sub-tree.

Let's take an example for better understanding,

Suppose we want to play golf on Sunday, but we want to find if it is suitable to play golf on Sunday or not. Before stepping out we chose to check out the weather forecast first like if it's hot or cold, the speed of the wind, humidity, how the weather is, i.e. is it sunny, cloudy, or rainy.

Suppose the weather forecast says that it will be Sunny with no wind and normal humidity.

Undertaking the following factors into account we can predict if its suitable to play or not.

Let us assume we have data of the last 10 days for the above-discussed factors, shown below.

Decision Trees in Machine learning

Then on applying the Decision Trees algorithm, we can predict that we can play golf on Sunday with the help of the above-discussed factors.

Decision Trees in Machine learning

Similarly, Decision tree could be used to predict the outcomes of many situations which have data split under various parameters & conditions (both nested and unnested).

Advantages of Decision Trees over Other Algorithms

  • It can be applied to both categorical & numerical data.
  • Doesn't need much of Data Pre-processing.
  • It can recover from outliers.
  • Gives the privilege to add more parameters for better precision and accuracy.
  • Can be used significantly large and complex datasets.


Comments and Discussions



Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© some rights reserved.