-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtree.dot
196 lines (196 loc) · 7.45 KB
/
tree.dot
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
digraph Tree {
node [shape=box] ;
0 [label="男性 <= 0.5\ngini = 0.4431\nsamples = 984\nvalue = [658, 326]"] ;
1 [label="pclass=3rd <= 0.5\ngini = 0.4587\nsamples = 348\nvalue = [124, 224]"] ;
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
2 [label="年龄 <= 2.5\ngini = 0.1685\nsamples = 183\nvalue = [17, 166]"] ;
1 -> 2 ;
3 [label="pclass=1st <= 0.5\ngini = 0.4444\nsamples = 3\nvalue = [1, 2]"] ;
2 -> 3 ;
4 [label="gini = 0.0\nsamples = 2\nvalue = [0, 2]"] ;
3 -> 4 ;
5 [label="gini = 0.0\nsamples = 1\nvalue = [1, 0]"] ;
3 -> 5 ;
6 [label="pclass=2nd <= 0.5\ngini = 0.162\nsamples = 180\nvalue = [16, 164]"] ;
2 -> 6 ;
7 [label="年龄 <= 50.5\ngini = 0.115\nsamples = 98\nvalue = [6, 92]"] ;
6 -> 7 ;
8 [label="年龄 <= 49.5\ngini = 0.1388\nsamples = 80\nvalue = [6, 74]"] ;
7 -> 8 ;
9 [label="年龄 <= 24.5\ngini = 0.12\nsamples = 78\nvalue = [5, 73]"] ;
8 -> 9 ;
10 [label="gini = 0.0\nsamples = 16\nvalue = [0, 16]"] ;
9 -> 10 ;
11 [label="年龄 <= 25.5\ngini = 0.1483\nsamples = 62\nvalue = [5, 57]"] ;
9 -> 11 ;
12 [label="gini = 0.0\nsamples = 1\nvalue = [1, 0]"] ;
11 -> 12 ;
13 [label="gini = 0.1225\nsamples = 61\nvalue = [4, 57]"] ;
11 -> 13 ;
14 [label="gini = 0.5\nsamples = 2\nvalue = [1, 1]"] ;
8 -> 14 ;
15 [label="gini = 0.0\nsamples = 18\nvalue = [0, 18]"] ;
7 -> 15 ;
16 [label="年龄 <= 55.0\ngini = 0.2142\nsamples = 82\nvalue = [10, 72]"] ;
6 -> 16 ;
17 [label="年龄 <= 16.5\ngini = 0.1975\nsamples = 81\nvalue = [9, 72]"] ;
16 -> 17 ;
18 [label="gini = 0.0\nsamples = 10\nvalue = [0, 10]"] ;
17 -> 18 ;
19 [label="年龄 <= 30.5\ngini = 0.2214\nsamples = 71\nvalue = [9, 62]"] ;
17 -> 19 ;
20 [label="年龄 <= 29.5\ngini = 0.32\nsamples = 30\nvalue = [6, 24]"] ;
19 -> 20 ;
21 [label="gini = 0.2604\nsamples = 26\nvalue = [4, 22]"] ;
20 -> 21 ;
22 [label="gini = 0.5\nsamples = 4\nvalue = [2, 2]"] ;
20 -> 22 ;
23 [label="年龄 <= 37.0\ngini = 0.1356\nsamples = 41\nvalue = [3, 38]"] ;
19 -> 23 ;
24 [label="gini = 0.0644\nsamples = 30\nvalue = [1, 29]"] ;
23 -> 24 ;
25 [label="gini = 0.2975\nsamples = 11\nvalue = [2, 9]"] ;
23 -> 25 ;
26 [label="gini = 0.0\nsamples = 1\nvalue = [1, 0]"] ;
16 -> 26 ;
27 [label="年龄 <= 36.0\ngini = 0.4559\nsamples = 165\nvalue = [107, 58]"] ;
1 -> 27 ;
28 [label="年龄 <= 32.5\ngini = 0.4647\nsamples = 158\nvalue = [100, 58]"] ;
27 -> 28 ;
29 [label="年龄 <= 19.5\ngini = 0.4579\nsamples = 155\nvalue = [100, 55]"] ;
28 -> 29 ;
30 [label="年龄 <= 13.5\ngini = 0.4938\nsamples = 18\nvalue = [8, 10]"] ;
29 -> 30 ;
31 [label="年龄 <= 5.5\ngini = 0.375\nsamples = 8\nvalue = [6, 2]"] ;
30 -> 31 ;
32 [label="年龄 <= 1.0833\ngini = 0.4444\nsamples = 3\nvalue = [1, 2]"] ;
31 -> 32 ;
33 [label="gini = 0.0\nsamples = 1\nvalue = [0, 1]"] ;
32 -> 33 ;
34 [label="gini = 0.5\nsamples = 2\nvalue = [1, 1]"] ;
32 -> 34 ;
35 [label="gini = 0.0\nsamples = 5\nvalue = [5, 0]"] ;
31 -> 35 ;
36 [label="年龄 <= 16.5\ngini = 0.32\nsamples = 10\nvalue = [2, 8]"] ;
30 -> 36 ;
37 [label="gini = 0.0\nsamples = 2\nvalue = [0, 2]"] ;
36 -> 37 ;
38 [label="年龄 <= 18.5\ngini = 0.375\nsamples = 8\nvalue = [2, 6]"] ;
36 -> 38 ;
39 [label="gini = 0.4082\nsamples = 7\nvalue = [2, 5]"] ;
38 -> 39 ;
40 [label="gini = 0.0\nsamples = 1\nvalue = [0, 1]"] ;
38 -> 40 ;
41 [label="年龄 <= 21.5\ngini = 0.4412\nsamples = 137\nvalue = [92, 45]"] ;
29 -> 41 ;
42 [label="gini = 0.0\nsamples = 4\nvalue = [4, 0]"] ;
41 -> 42 ;
43 [label="年龄 <= 23.5\ngini = 0.4477\nsamples = 133\nvalue = [88, 45]"] ;
41 -> 43 ;
44 [label="年龄 <= 22.5\ngini = 0.4444\nsamples = 3\nvalue = [1, 2]"] ;
43 -> 44 ;
45 [label="gini = 0.5\nsamples = 2\nvalue = [1, 1]"] ;
44 -> 45 ;
46 [label="gini = 0.0\nsamples = 1\nvalue = [0, 1]"] ;
44 -> 46 ;
47 [label="年龄 <= 29.0\ngini = 0.4427\nsamples = 130\nvalue = [87, 43]"] ;
43 -> 47 ;
48 [label="gini = 0.0\nsamples = 2\nvalue = [2, 0]"] ;
47 -> 48 ;
49 [label="gini = 0.4462\nsamples = 128\nvalue = [85, 43]"] ;
47 -> 49 ;
50 [label="gini = 0.0\nsamples = 3\nvalue = [0, 3]"] ;
28 -> 50 ;
51 [label="gini = 0.0\nsamples = 7\nvalue = [7, 0]"] ;
27 -> 51 ;
52 [label="年龄 <= 8.5\ngini = 0.2693\nsamples = 636\nvalue = [534, 102]"] ;
0 -> 52 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
53 [label="pclass=3rd <= 0.5\ngini = 0.3367\nsamples = 14\nvalue = [3, 11]"] ;
52 -> 53 ;
54 [label="gini = 0.0\nsamples = 8\nvalue = [0, 8]"] ;
53 -> 54 ;
55 [label="年龄 <= 3.5\ngini = 0.5\nsamples = 6\nvalue = [3, 3]"] ;
53 -> 55 ;
56 [label="年龄 <= 0.5833\ngini = 0.375\nsamples = 4\nvalue = [1, 3]"] ;
55 -> 56 ;
57 [label="gini = 0.0\nsamples = 1\nvalue = [1, 0]"] ;
56 -> 57 ;
58 [label="gini = 0.0\nsamples = 3\nvalue = [0, 3]"] ;
56 -> 58 ;
59 [label="gini = 0.0\nsamples = 2\nvalue = [2, 0]"] ;
55 -> 59 ;
60 [label="pclass=1st <= 0.5\ngini = 0.2498\nsamples = 622\nvalue = [531, 91]"] ;
52 -> 60 ;
61 [label="年龄 <= 18.5\ngini = 0.1754\nsamples = 484\nvalue = [437, 47]"] ;
60 -> 61 ;
62 [label="gini = 0.0\nsamples = 16\nvalue = [16, 0]"] ;
61 -> 62 ;
63 [label="年龄 <= 19.5\ngini = 0.1807\nsamples = 468\nvalue = [421, 47]"] ;
61 -> 63 ;
64 [label="pclass=3rd <= 0.5\ngini = 0.42\nsamples = 10\nvalue = [7, 3]"] ;
63 -> 64 ;
65 [label="gini = 0.4444\nsamples = 3\nvalue = [2, 1]"] ;
64 -> 65 ;
66 [label="gini = 0.4082\nsamples = 7\nvalue = [5, 2]"] ;
64 -> 66 ;
67 [label="年龄 <= 45.5\ngini = 0.1737\nsamples = 458\nvalue = [414, 44]"] ;
63 -> 67 ;
68 [label="年龄 <= 28.5\ngini = 0.1789\nsamples = 443\nvalue = [399, 44]"] ;
67 -> 68 ;
69 [label="年龄 <= 25.5\ngini = 0.1078\nsamples = 70\nvalue = [66, 4]"] ;
68 -> 69 ;
70 [label="gini = 0.162\nsamples = 45\nvalue = [41, 4]"] ;
69 -> 70 ;
71 [label="gini = 0.0\nsamples = 25\nvalue = [25, 0]"] ;
69 -> 71 ;
72 [label="年龄 <= 44.0\ngini = 0.1915\nsamples = 373\nvalue = [333, 40]"] ;
68 -> 72 ;
73 [label="gini = 0.189\nsamples = 369\nvalue = [330, 39]"] ;
72 -> 73 ;
74 [label="gini = 0.375\nsamples = 4\nvalue = [3, 1]"] ;
72 -> 74 ;
75 [label="gini = 0.0\nsamples = 15\nvalue = [15, 0]"] ;
67 -> 75 ;
76 [label="年龄 <= 54.5\ngini = 0.4344\nsamples = 138\nvalue = [94, 44]"] ;
60 -> 76 ;
77 [label="年龄 <= 17.5\ngini = 0.4649\nsamples = 117\nvalue = [74, 43]"] ;
76 -> 77 ;
78 [label="gini = 0.0\nsamples = 2\nvalue = [0, 2]"] ;
77 -> 78 ;
79 [label="年龄 <= 28.5\ngini = 0.4588\nsamples = 115\nvalue = [74, 41]"] ;
77 -> 79 ;
80 [label="年龄 <= 24.5\ngini = 0.4986\nsamples = 19\nvalue = [10, 9]"] ;
79 -> 80 ;
81 [label="年龄 <= 20.0\ngini = 0.375\nsamples = 8\nvalue = [6, 2]"] ;
80 -> 81 ;
82 [label="gini = 0.0\nsamples = 2\nvalue = [2, 0]"] ;
81 -> 82 ;
83 [label="gini = 0.4444\nsamples = 6\nvalue = [4, 2]"] ;
81 -> 83 ;
84 [label="年龄 <= 26.5\ngini = 0.4628\nsamples = 11\nvalue = [4, 7]"] ;
80 -> 84 ;
85 [label="gini = 0.375\nsamples = 4\nvalue = [1, 3]"] ;
84 -> 85 ;
86 [label="gini = 0.4898\nsamples = 7\nvalue = [3, 4]"] ;
84 -> 86 ;
87 [label="年龄 <= 31.0971\ngini = 0.4444\nsamples = 96\nvalue = [64, 32]"] ;
79 -> 87 ;
88 [label="gini = 0.0\nsamples = 6\nvalue = [6, 0]"] ;
87 -> 88 ;
89 [label="年龄 <= 51.5\ngini = 0.4583\nsamples = 90\nvalue = [58, 32]"] ;
87 -> 89 ;
90 [label="gini = 0.4521\nsamples = 84\nvalue = [55, 29]"] ;
89 -> 90 ;
91 [label="gini = 0.5\nsamples = 6\nvalue = [3, 3]"] ;
89 -> 91 ;
92 [label="年龄 <= 60.5\ngini = 0.0907\nsamples = 21\nvalue = [20, 1]"] ;
76 -> 92 ;
93 [label="年龄 <= 59.0\ngini = 0.1975\nsamples = 9\nvalue = [8, 1]"] ;
92 -> 93 ;
94 [label="gini = 0.0\nsamples = 7\nvalue = [7, 0]"] ;
93 -> 94 ;
95 [label="gini = 0.5\nsamples = 2\nvalue = [1, 1]"] ;
93 -> 95 ;
96 [label="gini = 0.0\nsamples = 12\nvalue = [12, 0]"] ;
92 -> 96 ;
}