Advertisement
Guest User

Untitled

a guest
Oct 21st, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.15 KB | None | 0 0
  1. PS D:\Dropbox (Personal)\CompSci\IS\A2b 15%\python\v5 accuracy computation finished> python question2.py train.txt I 10
  2. test.txt output.txt
  3. currDepth = 0
  4. maxinfogain = 0.2037756630735984
  5. branch node = 22
  6. going left
  7. currDepth = 1
  8. maxinfogain = 0.30592705292616107
  9. branch node = 9
  10. going left
  11. currDepth = 2
  12. maxinfogain = 0.3621781002440545
  13. branch node = 34
  14. going left
  15. currDepth = 3
  16. maxinfogain = 0.47610272091791417
  17. branch node = 5
  18. going left
  19. currDepth = 4
  20. maxinfogain = 0.3262361451377478
  21. branch node = 36
  22. going left
  23. currDepth = 5
  24. maxinfogain = 0.6189075943364787
  25. branch node = 16
  26. going left
  27. currDepth = 6
  28. maxinfogain = 0.8119458497039282
  29. branch node = 24
  30. going left
  31. currDepth = 7
  32. maxinfogain = 0.9528344696962279
  33. branch node = 11
  34. going left
  35. currDepth = 8
  36. leaf node (same class) = 1
  37. going right
  38. currDepth = 8
  39. maxinfogain = 0.687370883701019
  40. branch node = 37
  41. going left
  42. currDepth = 9
  43. leaf node (same class) = 1
  44. going right
  45. currDepth = 9
  46. maxinfogain = 0.6939013886485035
  47. branch node = 27
  48. going left
  49. currDepth = 10
  50. maxinfogain = 1.0
  51. branch node = 12
  52. going left
  53. currDepth = 11
  54. leaf node (same class) = 1
  55. going right
  56. currDepth = 11
  57. leaf node (same class) = 0
  58. going right
  59. currDepth = 10
  60. leaf node (same class) = 1
  61. going right
  62. currDepth = 7
  63. maxinfogain = 1.0
  64. branch node = 18
  65. going left
  66. currDepth = 8
  67. leaf node (same class) = 0
  68. going right
  69. currDepth = 8
  70. leaf node (same class) = 1
  71. going right
  72. currDepth = 6
  73. maxinfogain = 0.7941215903190539
  74. branch node = 0
  75. going left
  76. currDepth = 7
  77. leaf node (same class) = 0
  78. going right
  79. currDepth = 7
  80. maxinfogain = 0.7777777777777778
  81. branch node = 24
  82. going left
  83. currDepth = 8
  84. leaf node (same class) = 1
  85. going right
  86. currDepth = 8
  87. maxinfogain = 1.0
  88. branch node = 18
  89. going left
  90. currDepth = 9
  91. leaf node (same class) = 0
  92. going right
  93. currDepth = 9
  94. leaf node (same class) = 1
  95. going right
  96. currDepth = 5
  97. maxinfogain = 0.3165627626131955
  98. branch node = 10
  99. going left
  100. currDepth = 6
  101. maxinfogain = 0.9346693668089642
  102. branch node = 1
  103. going left
  104. currDepth = 7
  105. leaf node (same class) = 0
  106. going right
  107. currDepth = 7
  108. maxinfogain = 0.8181818181818181
  109. branch node = 35
  110. going left
  111. currDepth = 8
  112. maxinfogain = 1.0
  113. branch node = 17
  114. going left
  115. currDepth = 9
  116. leaf node (same class) = 1
  117. going right
  118. currDepth = 9
  119. leaf node (same class) = 0
  120. going right
  121. currDepth = 8
  122. leaf node (same class) = 0
  123. going right
  124. currDepth = 6
  125. maxinfogain = 0.31756836407440825
  126. branch node = 15
  127. going left
  128. currDepth = 7
  129. maxinfogain = 0.6584610733973878
  130. branch node = 0
  131. going left
  132. currDepth = 8
  133. maxinfogain = 0.8775066043493868
  134. branch node = 11
  135. going left
  136. currDepth = 9
  137. leaf node (same class) = 0
  138. going right
  139. currDepth = 9
  140. maxinfogain = 0.6556390622295665
  141. branch node = 19
  142. going left
  143. currDepth = 10
  144. leaf node (same class) = 0
  145. going right
  146. currDepth = 10
  147. maxinfogain = 0.5408520829727552
  148. branch node = 21
  149. going left
  150. currDepth = 11
  151. leaf node (max depth) = 1
  152. going right
  153. currDepth = 11
  154. leaf node (same class) = 0
  155. going right
  156. currDepth = 8
  157. maxinfogain = 1.0
  158. branch node = 13
  159. going left
  160. currDepth = 9
  161. leaf node (same class) = 1
  162. going right
  163. currDepth = 9
  164. leaf node (same class) = 0
  165. going right
  166. currDepth = 7
  167. leaf node (same class) = 1
  168. going right
  169. currDepth = 4
  170. leaf node (same class) = 1
  171. going right
  172. currDepth = 3
  173. maxinfogain = 0.6678558081443954
  174. branch node = 19
  175. going left
  176. currDepth = 4
  177. maxinfogain = 0.9181066739557728
  178. branch node = 35
  179. going left
  180. currDepth = 5
  181. leaf node (same class) = 0
  182. going right
  183. currDepth = 5
  184. maxinfogain = 0.7073259336775497
  185. branch node = 6
  186. going left
  187. currDepth = 6
  188. maxinfogain = 0.5044619700808889
  189. branch node = 3
  190. going left
  191. currDepth = 7
  192. maxinfogain = 0.38780277729700696
  193. branch node = 2
  194. going left
  195. currDepth = 8
  196. maxinfogain = 1.0
  197. branch node = 17
  198. going left
  199. currDepth = 9
  200. leaf node (same class) = 1
  201. going right
  202. currDepth = 9
  203. leaf node (same class) = 0
  204. going right
  205. currDepth = 8
  206. leaf node (same class) = 0
  207. going right
  208. currDepth = 7
  209. leaf node (same class) = 0
  210. going right
  211. currDepth = 6
  212. leaf node (same class) = 0
  213. going right
  214. currDepth = 4
  215. maxinfogain = 0.4424383406689114
  216. branch node = 6
  217. going left
  218. currDepth = 5
  219. maxinfogain = 0.28767123287671237
  220. branch node = 28
  221. going left
  222. currDepth = 6
  223. maxinfogain = 0.2814861112496223
  224. branch node = 17
  225. going left
  226. currDepth = 7
  227. maxinfogain = 0.23283533921546917
  228. branch node = 31
  229. going left
  230. currDepth = 8
  231. maxinfogain = 0.31660864409007383
  232. branch node = 3
  233. going left
  234. currDepth = 9
  235. maxinfogain = 0.484991357679177
  236. branch node = 21
  237. going left
  238. currDepth = 10
  239. maxinfogain = 0.6535164951351828
  240. branch node = 2
  241. going left
  242. currDepth = 11
  243. leaf node (max depth) = 1
  244. going right
  245. currDepth = 11
  246. leaf node (same class) = 0
  247. going right
  248. currDepth = 10
  249. leaf node (same class) = 0
  250. going right
  251. currDepth = 9
  252. leaf node (same class) = 0
  253. going right
  254. currDepth = 8
  255. leaf node (same class) = 0
  256. going right
  257. currDepth = 7
  258. leaf node (same class) = 0
  259. going right
  260. currDepth = 6
  261. leaf node (same class) = 0
  262. going right
  263. currDepth = 5
  264. leaf node (same class) = 0
  265. going right
  266. currDepth = 2
  267. leaf node (same class) = 0
  268. going right
  269. currDepth = 1
  270. leaf node (same class) = 1
  271. Decision Tree built!
  272. 0.9926402943882244
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement