Learn practical skills, build real-world projects, and advance your career

Task 2: Prediction using Decision Tree Algorithm

||GRIP@ THE SPARKS FOUNDATION|| JUNE2021 DSBA TASK

AUTHOR:ABHISHEK BINDHANI

This workshop deals with understanding the working of decision trees. I have created the Decision Tree classifier and visualized it graphically. The purpose of this task is if we feed any new data to this classifier, it would be able to predict the right class accordingly.

Technical Stack : scikit-learn, Numpy Array, Seaborn, Pandas, Matplotlib, Pydot

# IMPORTING THE REQUIRED LIBRARIES
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn import tree
from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import train_test_split
import sklearn.metrics as sm