Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PS D:\Dropbox (Personal)\CompSci\IS\A2b 15%\python\v5 accuracy computation finished> python question2.py train.txt I 10
- test.txt output.txt
- currDepth = 0
- maxinfogain = 0.2037756630735984
- branch node = 22
- going left
- currDepth = 1
- maxinfogain = 0.30592705292616107
- branch node = 9
- going left
- currDepth = 2
- maxinfogain = 0.3621781002440545
- branch node = 34
- going left
- currDepth = 3
- maxinfogain = 0.47610272091791417
- branch node = 5
- going left
- currDepth = 4
- maxinfogain = 0.3262361451377478
- branch node = 36
- going left
- currDepth = 5
- maxinfogain = 0.6189075943364787
- branch node = 16
- going left
- currDepth = 6
- maxinfogain = 0.8119458497039282
- branch node = 24
- going left
- currDepth = 7
- maxinfogain = 0.9528344696962279
- branch node = 11
- going left
- currDepth = 8
- leaf node (same class) = 1
- going right
- currDepth = 8
- maxinfogain = 0.687370883701019
- branch node = 37
- going left
- currDepth = 9
- leaf node (same class) = 1
- going right
- currDepth = 9
- maxinfogain = 0.6939013886485035
- branch node = 27
- going left
- currDepth = 10
- maxinfogain = 1.0
- branch node = 12
- going left
- currDepth = 11
- leaf node (same class) = 1
- going right
- currDepth = 11
- leaf node (same class) = 0
- going right
- currDepth = 10
- leaf node (same class) = 1
- going right
- currDepth = 7
- maxinfogain = 1.0
- branch node = 18
- going left
- currDepth = 8
- leaf node (same class) = 0
- going right
- currDepth = 8
- leaf node (same class) = 1
- going right
- currDepth = 6
- maxinfogain = 0.7941215903190539
- branch node = 0
- going left
- currDepth = 7
- leaf node (same class) = 0
- going right
- currDepth = 7
- maxinfogain = 0.7777777777777778
- branch node = 24
- going left
- currDepth = 8
- leaf node (same class) = 1
- going right
- currDepth = 8
- maxinfogain = 1.0
- branch node = 18
- going left
- currDepth = 9
- leaf node (same class) = 0
- going right
- currDepth = 9
- leaf node (same class) = 1
- going right
- currDepth = 5
- maxinfogain = 0.3165627626131955
- branch node = 10
- going left
- currDepth = 6
- maxinfogain = 0.9346693668089642
- branch node = 1
- going left
- currDepth = 7
- leaf node (same class) = 0
- going right
- currDepth = 7
- maxinfogain = 0.8181818181818181
- branch node = 35
- going left
- currDepth = 8
- maxinfogain = 1.0
- branch node = 17
- going left
- currDepth = 9
- leaf node (same class) = 1
- going right
- currDepth = 9
- leaf node (same class) = 0
- going right
- currDepth = 8
- leaf node (same class) = 0
- going right
- currDepth = 6
- maxinfogain = 0.31756836407440825
- branch node = 15
- going left
- currDepth = 7
- maxinfogain = 0.6584610733973878
- branch node = 0
- going left
- currDepth = 8
- maxinfogain = 0.8775066043493868
- branch node = 11
- going left
- currDepth = 9
- leaf node (same class) = 0
- going right
- currDepth = 9
- maxinfogain = 0.6556390622295665
- branch node = 19
- going left
- currDepth = 10
- leaf node (same class) = 0
- going right
- currDepth = 10
- maxinfogain = 0.5408520829727552
- branch node = 21
- going left
- currDepth = 11
- leaf node (max depth) = 1
- going right
- currDepth = 11
- leaf node (same class) = 0
- going right
- currDepth = 8
- maxinfogain = 1.0
- branch node = 13
- going left
- currDepth = 9
- leaf node (same class) = 1
- going right
- currDepth = 9
- leaf node (same class) = 0
- going right
- currDepth = 7
- leaf node (same class) = 1
- going right
- currDepth = 4
- leaf node (same class) = 1
- going right
- currDepth = 3
- maxinfogain = 0.6678558081443954
- branch node = 19
- going left
- currDepth = 4
- maxinfogain = 0.9181066739557728
- branch node = 35
- going left
- currDepth = 5
- leaf node (same class) = 0
- going right
- currDepth = 5
- maxinfogain = 0.7073259336775497
- branch node = 6
- going left
- currDepth = 6
- maxinfogain = 0.5044619700808889
- branch node = 3
- going left
- currDepth = 7
- maxinfogain = 0.38780277729700696
- branch node = 2
- going left
- currDepth = 8
- maxinfogain = 1.0
- branch node = 17
- going left
- currDepth = 9
- leaf node (same class) = 1
- going right
- currDepth = 9
- leaf node (same class) = 0
- going right
- currDepth = 8
- leaf node (same class) = 0
- going right
- currDepth = 7
- leaf node (same class) = 0
- going right
- currDepth = 6
- leaf node (same class) = 0
- going right
- currDepth = 4
- maxinfogain = 0.4424383406689114
- branch node = 6
- going left
- currDepth = 5
- maxinfogain = 0.28767123287671237
- branch node = 28
- going left
- currDepth = 6
- maxinfogain = 0.2814861112496223
- branch node = 17
- going left
- currDepth = 7
- maxinfogain = 0.23283533921546917
- branch node = 31
- going left
- currDepth = 8
- maxinfogain = 0.31660864409007383
- branch node = 3
- going left
- currDepth = 9
- maxinfogain = 0.484991357679177
- branch node = 21
- going left
- currDepth = 10
- maxinfogain = 0.6535164951351828
- branch node = 2
- going left
- currDepth = 11
- leaf node (max depth) = 1
- going right
- currDepth = 11
- leaf node (same class) = 0
- going right
- currDepth = 10
- leaf node (same class) = 0
- going right
- currDepth = 9
- leaf node (same class) = 0
- going right
- currDepth = 8
- leaf node (same class) = 0
- going right
- currDepth = 7
- leaf node (same class) = 0
- going right
- currDepth = 6
- leaf node (same class) = 0
- going right
- currDepth = 5
- leaf node (same class) = 0
- going right
- currDepth = 2
- leaf node (same class) = 0
- going right
- currDepth = 1
- leaf node (same class) = 1
- Decision Tree built!
- 0.9926402943882244
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement