-
Notifications
You must be signed in to change notification settings - Fork 1
/
decision_tree.gv
65 lines (65 loc) · 4.28 KB
/
decision_tree.gv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
digraph Tree {
node [shape=box, style="filled, rounded", color="black", fontname=helvetica] ;
edge [fontname=helvetica] ;
0 [label=<Contract ≤ 0.5<br/>gini = 0.39<br/>samples = 5625<br/>value = [4129, 1496]<br/>class = No churn>, fillcolor="#e58139a3"] ;
1 [label=<InternetService ≤ 1.5<br/>gini = 0.489<br/>samples = 3109<br/>value = [1782, 1327]<br/>class = No churn>, fillcolor="#e5813941"] ;
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
2 [label=<tenure ≤ 3.5<br/>gini = 0.406<br/>samples = 1391<br/>value = [997, 394]<br/>class = No churn>, fillcolor="#e581399a"] ;
1 -> 2 ;
3 [label=<InternetService ≤ 0.5<br/>gini = 0.494<br/>samples = 461<br/>value = [255, 206]<br/>class = No churn>, fillcolor="#e5813931"] ;
2 -> 3 ;
4 [label=<gini = 0.39<br/>samples = 177<br/>value = [130, 47]<br/>class = No churn>, fillcolor="#e58139a3"] ;
3 -> 4 ;
5 [label=<gini = 0.493<br/>samples = 284<br/>value = [125, 159]<br/>class = Churn>, fillcolor="#399de537"] ;
3 -> 5 ;
6 [label=<PhoneService ≤ 0.5<br/>gini = 0.323<br/>samples = 930<br/>value = [742, 188]<br/>class = No churn>, fillcolor="#e58139be"] ;
2 -> 6 ;
7 [label=<gini = 0.439<br/>samples = 218<br/>value = [147, 71]<br/>class = No churn>, fillcolor="#e5813984"] ;
6 -> 7 ;
8 [label=<gini = 0.275<br/>samples = 712<br/>value = [595, 117]<br/>class = No churn>, fillcolor="#e58139cd"] ;
6 -> 8 ;
9 [label=<tenure ≤ 13.5<br/>gini = 0.496<br/>samples = 1718<br/>value = [785, 933]<br/>class = Churn>, fillcolor="#399de528"] ;
1 -> 9 ;
10 [label=<tenure ≤ 1.5<br/>gini = 0.422<br/>samples = 771<br/>value = [233, 538]<br/>class = Churn>, fillcolor="#399de591"] ;
9 -> 10 ;
11 [label=<gini = 0.248<br/>samples = 186<br/>value = [27, 159]<br/>class = Churn>, fillcolor="#399de5d4"] ;
10 -> 11 ;
12 [label=<gini = 0.456<br/>samples = 585<br/>value = [206, 379]<br/>class = Churn>, fillcolor="#399de574"] ;
10 -> 12 ;
13 [label=<PaymentMethod ≤ 0.5<br/>gini = 0.486<br/>samples = 947<br/>value = [552, 395]<br/>class = No churn>, fillcolor="#e5813949"] ;
9 -> 13 ;
14 [label=<gini = 0.5<br/>samples = 529<br/>value = [268, 261]<br/>class = No churn>, fillcolor="#e5813907"] ;
13 -> 14 ;
15 [label=<gini = 0.436<br/>samples = 418<br/>value = [284, 134]<br/>class = No churn>, fillcolor="#e5813987"] ;
13 -> 15 ;
16 [label=<MonthlyCharges ≤ 93.675<br/>gini = 0.125<br/>samples = 2516<br/>value = [2347, 169]<br/>class = No churn>, fillcolor="#e58139ed"] ;
0 -> 16 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
17 [label=<Contract ≤ 1.5<br/>gini = 0.074<br/>samples = 1898<br/>value = [1825, 73]<br/>class = No churn>, fillcolor="#e58139f5"] ;
16 -> 17 ;
18 [label=<MonthlyCharges ≤ 51.675<br/>gini = 0.13<br/>samples = 872<br/>value = [811, 61]<br/>class = No churn>, fillcolor="#e58139ec"] ;
17 -> 18 ;
19 [label=<gini = 0.065<br/>samples = 413<br/>value = [399, 14]<br/>class = No churn>, fillcolor="#e58139f6"] ;
18 -> 19 ;
20 [label=<gini = 0.184<br/>samples = 459<br/>value = [412, 47]<br/>class = No churn>, fillcolor="#e58139e2"] ;
18 -> 20 ;
21 [label=<SeniorCitizen ≤ 0.5<br/>gini = 0.023<br/>samples = 1026<br/>value = [1014, 12]<br/>class = No churn>, fillcolor="#e58139fc"] ;
17 -> 21 ;
22 [label=<gini = 0.019<br/>samples = 963<br/>value = [954, 9]<br/>class = No churn>, fillcolor="#e58139fd"] ;
21 -> 22 ;
23 [label=<gini = 0.091<br/>samples = 63<br/>value = [60, 3]<br/>class = No churn>, fillcolor="#e58139f2"] ;
21 -> 23 ;
24 [label=<Contract ≤ 1.5<br/>gini = 0.262<br/>samples = 618<br/>value = [522, 96]<br/>class = No churn>, fillcolor="#e58139d0"] ;
16 -> 24 ;
25 [label=<MonthlyCharges ≤ 99.175<br/>gini = 0.353<br/>samples = 310<br/>value = [239, 71]<br/>class = No churn>, fillcolor="#e58139b3"] ;
24 -> 25 ;
26 [label=<gini = 0.193<br/>samples = 83<br/>value = [74, 9]<br/>class = No churn>, fillcolor="#e58139e0"] ;
25 -> 26 ;
27 [label=<gini = 0.397<br/>samples = 227<br/>value = [165, 62]<br/>class = No churn>, fillcolor="#e581399f"] ;
25 -> 27 ;
28 [label=<MonthlyCharges ≤ 94.075<br/>gini = 0.149<br/>samples = 308<br/>value = [283, 25]<br/>class = No churn>, fillcolor="#e58139e8"] ;
24 -> 28 ;
29 [label=<gini = 0.444<br/>samples = 3<br/>value = [1, 2]<br/>class = Churn>, fillcolor="#399de57f"] ;
28 -> 29 ;
30 [label=<gini = 0.139<br/>samples = 305<br/>value = [282, 23]<br/>class = No churn>, fillcolor="#e58139ea"] ;
28 -> 30 ;
}