Experiment 8
Experiment 8
Decision Tree
URK21CS2056
Aim: To analyse the performance of Decision Tree Classification Technique.Description:
Decision Tree is a Supervised learning technique that can be used for both classification and
preferred for solving Classification problems. It is a tree-structured classifier, where inter
dataset, branches represent the decision rules and each leaf node represents the outcome.
In a Decision tree, there are two nodes, which are the Decision Node and Leaf Node. Dec
and have multiple branches, whereas Leaf nodes are the output of those decisions and do not co
or the test are performed on the basis of features of the given dataset. It is a graphical
repsolutions to a problem/decision based on given conditions. It is called a decision tree
becausroot node, which expands on further branches and constructs a tree-like structure. In
order towhich stands for Classification and Regression Tree algorithm. A decision tree simply
asks ait further split the tree into subtrees.
Decision Tree Terminologies
Root Node: Root node is from where the decision tree starts. It represents the entire
datasmore homogeneous sets.
Leaf Node: Leaf nodes are the final output node, and the tree cannot be segregated further
Splitting: Splitting is the process of dividing the decision node/root node into sub-nodes
Branch/Sub Tree: A tree formed by splitting the tree.
Pruning: Pruning is the process of removing the unwanted branches from the tree. Parent/Child
node: The root node of the tree is called the parent node, and other nodes are
Algorithm:
Step-1: Begin the tree with the root node, says S, which contains the complete dataset.
Step-2: Find the best attribute in the dataset using Attribute Selection Measure (ASM).
Step-3: Divide the S into subsets that contains possible values for the best attributes.
Step-4: Generate the decision tree node, which contains the best attribute.
Step-5: Recursively make new decision trees using the subsets of the dataset created in
stContinue this process until a stage is reached where you cannot further classify the
nodes
1. Develop a Decision Tree classification model for the Cancer dataset using the scikit-learn
import pandas as pd
from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import train_test_split
[2]: import matplotlib.pyplot as plt
1
from sklearn.tree import plot_tree
from sklearn.metrics import␣
↪accuracy_score,recall_score,f1_score,roc_curve,roc_auc_score,precision_score,confusion_m
atr
[3]: df =
pd.read_csv('Cancer.csv') df
[3]: id radius_mean texture_mean perimeter_mean area_mean \
0 842302 17.99 10.38 122.80 1001.0
1 842517 20.57 17.77 132.90 1326.0
2 84300903 19.69 21.25 130.00 1203.0
3 84348301 11.42 20.38 77.58 386.1
4 84358402 20.29 14.3 135.1 1297.0
.. … … 4 0 …
564 926424 21.56 … … 1479.0
22.3 142.0
9 0
565 926682 20.13 28.25 131.20 1261.0
566 926954 16.60 28.08 108.30 858.1
567 927241 20.60 29.33 140.10 1265.0
568 92751 7.76 24.54 47.92 181.0
2
a. Use the columns:radius_mean, texture_mean, perimeter_mean,area_mean, smooth-
ness_mean, compactness_mean, concavity_mean, concave points_mean, symmetry_mean,
fractal_dimension_mean as the independent variables
[5]: x=df[["radius_mean", "texture_mean", "perimeter_mean","area_mean",
"smoothness_mean", "compactness_mean", "concavity_mean", "concave points_mean",
"symmetry_mean", "fractal_dimension_mean"]]
x
fractal_dimension_mean
0 0.07871
1 0.05667
2 0.05999
3 0.09744
4 0.05883
.. …
564 0.05623
565 0.05533
566 0.05648
567 0.07016
568 0.05884
3
[569 rows x 10 columns]
b. Use the target variable as diagnosis (Malignant – M, Benign – B)
[6]: y = df['diagnosis']
y
[6] 0 M
:
1 M
2 M
3 M
4 M
..
564 M
565 M
566 M
567 M
568 B
Name: diagnosis, Length: 569, dtype: object
d. Divide the data into training (75%) and testing set (25%)
[8]: x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=0.
↪25,random_state=1)
4
y_pred = tree_entropy.predict(x_test)
tree_ig = DecisionTreeClassifier(criterion='gini')
tree_ig.fit(x_train,y_train)
y_pred_ig = tree_ig.predict(x_test)
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:767:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if not hasattr(array, "sparse") and array.dtypes.apply(is_sparse).any():
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:767:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if not hasattr(array, "sparse") and array.dtypes.apply(is_sparse).any():
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:767:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if not hasattr(array, "sparse") and array.dtypes.apply(is_sparse).any():
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
5
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:767:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if not hasattr(array, "sparse") and array.dtypes.apply(is_sparse).any():
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
f. Analyse the performance of the classifier with various performance measures such as confusion
matrix, accuracy, recall, precision, specificity, f-score, Receiver operating characteristic (ROC)
curve
[12]:
#Accuracy
print('Accuracy using Entropy : ',accuracy_score(y_test,y_pred))
print('Accuracy using ig : ',accuracy_score(y_test,y_pred_ig))
Accuracy using Entropy :
0.916083916083916
Accuracy using ig : 0.8951048951048951
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
6
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
[13]: #Recall
print('Recall using Entropy : ',recall_score(y_test,y_pred))
print('Recall using ig : ',recall_score(y_test,y_pred_ig))
Recall using Entropy :
0.8727272727272727
Recall using ig : 0.8363636363636363
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
[14]: if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
#Precision
print('Precision using Entropy : ',precision_score(y_test,y_pred))
print('Precision
Precision using ig
using Entropy : : ',precision_score(y_test,y_pred_ig))
0.9056603773584906
Precision using ig : 0.8846153846153846
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
7
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
[15]:
#Specificity
print('Specificity using Entropy : ',recall_score(y_test,y_pred,pos_label=0))
print('Specificity using ig : ',recall_score(y_test,y_pred_ig,pos_label=0))
Specificity using Entropy :
0.9431818181818182
Specificity using ig : 0.9318181818181818
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
8
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
[16]:
#F1_score
print('F1_score using Entropy : ',accuracy_score(y_test,y_pred))
print('F1_score using ig : ',accuracy_score(y_test,y_pred_ig))
F1_score using Entropy :
0.916083916083916
F1_score using ig : 0.8951048951048951
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
9
[17]: #ROC curve entropy
fpr, tpr, _ = roc_curve(y_test,
y_pred
)plt.plot(fpr,tpr)
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:605:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
[17] : [<matplotlib.lines.Line2D at 0x7f3a23e0eb20>]
10
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
[18] : [<matplotlib.lines.Line2D at 0x7f3a1bd17220>]
11
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype):
/opt/anaconda3/lib/python3.9/site-packages/sklearn/utils/validation.py:614:
FutureWarning: is_sparse is deprecated and will be removed in a future version.
Check `isinstance(dtype, pd.SparseDtype)` instead.
if is_sparse(pd_dtype) or not is_extension_array_dtype(pd_dtype):
g. Display the constructed decision tree.
[20]: plot_tree(tree_ig)
12
15\nvalue = [13, 2]'),
Text(0.3870967741935484, 0.4375, 'gini = 0.0\nsamples = 1\nvalue = [0,
1]'),Text(0.45161290322580644, 0.4375, 'x[8] <= 0.169\ngini =
0.133\nsamples =
14\nvalue = [13, 1]'),
Text(0.41935483870967744, 0.3125, 'gini = 0.0\nsamples = 1\nvalue = [0,
1]'), Text(0.4838709677419355, 0.3125, 'gini = 0.0\nsamples = 13\nvalue =
[13, 0]'),Text(0.4838709677419355, 0.5625, 'gini = 0.0\nsamples = 4\nvalue
= [0, 4]'), Text(0.7096774193548387, 0.6875, 'x[2] <= 88.25\ngini =
0.125\nsamples =
149\nvalue = [10, 139]'),
Text(0.6129032258064516, 0.5625, 'x[6] <= 0.107\ngini = 0.497\nsamples =
13\nvalue = [6, 7]'),
Text(0.5806451612903226, 0.4375, 'x[3] <= 530.45\ngini = 0.375\nsamples =
8\nvalue = [6, 2]'),
Text(0.5483870967741935, 0.3125, 'gini = 0.0\nsamples = 5\nvalue = [5,
0]'),Text(0.6129032258064516, 0.3125, 'x[0] <= 13.395\ngini =
0.444\nsamples =
3\nvalue = [1, 2]'),
Text(0.5806451612903226, 0.1875, 'gini = 0.0\nsamples = 2\nvalue = [0,
2]'),Text(0.6451612903225806, 0.1875, 'gini = 0.0\nsamples = 1\nvalue = [1,
0]'),Text(0.6451612903225806, 0.4375, 'gini = 0.0\nsamples = 5\nvalue = [0,
5]'), Text(0.8064516129032258, 0.5625, 'x[4] <= 0.079\ngini =
0.057\nsamples =
136\nvalue = [4, 132]'),
Text(0.7741935483870968, 0.4375, 'gini = 0.0\nsamples = 1\nvalue = [1,
0]'), Text(0.8387096774193549, 0.4375, 'x[6] <= 0.081\ngini =
0.043\nsamples =
135\nvalue = [3, 132]'),
Text(0.7419354838709677, 0.3125, 'x[3] <= 682.7\ngini = 0.5\nsamples = 4\nvalue
= [2, 2]'),
Text(0.7096774193548387, 0.1875, 'gini = 0.0\nsamples = 1\nvalue = [1,
0]'),Text(0.7741935483870968, 0.1875, 'x[6] <= 0.076\ngini =
0.444\nsamples =
3\nvalue = [1, 2]'),
Text(0.7419354838709677, 0.0625, 'gini = 0.0\nsamples = 2\nvalue = [0,
2]'),Text(0.8064516129032258, 0.0625, 'gini = 0.0\nsamples = 1\nvalue = [1,
0]'), Text(0.9354838709677419, 0.3125, 'x[4] <= 0.088\ngini =
0.015\nsamples =
131\nvalue = [1, 130]'),
Text(0.9032258064516129, 0.1875, 'x[3] <= 657.85\ngini = 0.165\nsamples =
11\nvalue = [1, 10]'),
Text(0.8709677419354839, 0.0625, 'gini = 0.0\nsamples = 1\nvalue = [1, 0]'),
Text(0.9354838709677419, 0.0625, 'gini = 0.0\nsamples = 10\nvalue = [0,
10]'), Text(0.967741935483871, 0.1875, 'gini = 0.0\nsamples = 120\nvalue = [0,
120]')]
13
Result: Thus the performance analysis for decision tree classification technique is done successfully.
14