Decision Tree Using Python Programming

Name: Tejas Sahoo
Roll No: k057
Branch: BTech Cyber Security

Aim:

To implement decision tree using python programming

Introduction:

A decision tree is a non-parametric supervised learning algorithm, which is utilized for both classification and regression tasks. It has a hierarchical, tree structure, which consists of a root node, branches, internal nodes and leaf nodes.

Applications:

  1. Decision Making: Used in daily life for decision-making.
  2. Health Care: Helps medical professionals with diagnoses.
  3. Financial Analysis: Used in options pricing and strategy development.

Dataset used:

  • Wine dataset, which contains the chemical analysis of wines grown in the same region in Italy but derived from three different cultivars.

Steps Taken:

  1. Import python libraries.
  2. Load the Wine dataset.
  3. Split the data into training and testing sets.
  4. Initialize and train the Decision Tree model.
  5. Make predictions, calculate accuracy, and visualize the Decision Tree.

Output

Conclusion:

Decision tree was successfully implemented in Python.