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:
- Decision Making: Used in daily life for decision-making.
- Health Care: Helps medical professionals with diagnoses.
- 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:
- Import python libraries.
- Load the Wine dataset.
- Split the data into training and testing sets.
- Initialize and train the Decision Tree model.
- Make predictions, calculate accuracy, and visualize the Decision Tree.
Output
Conclusion:
Decision tree was successfully implemented in Python.