Skip to content

Commit

Permalink
train model using decision tree using platform_os dataframe
Browse files Browse the repository at this point in the history
  • Loading branch information
tigist13 committed Sep 3, 2022
1 parent f52b484 commit 07d4a84
Show file tree
Hide file tree
Showing 3 changed files with 356 additions and 50 deletions.
57 changes: 57 additions & 0 deletions notebooks/AbTestDecisionTree.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
digraph Tree {
node [shape=box, style="filled, rounded", color="black", fontname="helvetica"] ;
edge [fontname="helvetica"] ;
0 [label=<hour &le; 20.5<br/>gini = 0.496<br/>samples = 895<br/>value = [486, 409]<br/>class = Aware>, fillcolor="#fbebe0"] ;
1 [label=<device_make &le; 91.0<br/>gini = 0.495<br/>samples = 855<br/>value = [470, 385]<br/>class = Aware>, fillcolor="#fae8db"] ;
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
2 [label=<device_make &le; 68.5<br/>gini = 0.497<br/>samples = 814<br/>value = [441, 373]<br/>class = Aware>, fillcolor="#fbece0"] ;
1 -> 2 ;
3 [label=<hour &le; 12.5<br/>gini = 0.494<br/>samples = 738<br/>value = [410, 328]<br/>class = Aware>, fillcolor="#fae6d7"] ;
2 -> 3 ;
4 [label=<gini = 0.485<br/>samples = 374<br/>value = [219, 155]<br/>class = Aware>, fillcolor="#f7dac5"] ;
3 -> 4 ;
5 [label=<gini = 0.499<br/>samples = 364<br/>value = [191, 173]<br/>class = Aware>, fillcolor="#fdf3ec"] ;
3 -> 5 ;
6 [label=<browser &le; 3.0<br/>gini = 0.483<br/>samples = 76<br/>value = [31, 45]<br/>class = Not Aware>, fillcolor="#c1e1f7"] ;
2 -> 6 ;
7 [label=<gini = 0.355<br/>samples = 26<br/>value = [6, 20]<br/>class = Not Aware>, fillcolor="#74baed"] ;
6 -> 7 ;
8 [label=<gini = 0.5<br/>samples = 50<br/>value = [25, 25]<br/>class = Aware>, fillcolor="#ffffff"] ;
6 -> 8 ;
9 [label=<hour &le; 13.5<br/>gini = 0.414<br/>samples = 41<br/>value = [29, 12]<br/>class = Aware>, fillcolor="#f0b58b"] ;
1 -> 9 ;
10 [label=<hour &le; 12.5<br/>gini = 0.488<br/>samples = 26<br/>value = [15, 11]<br/>class = Aware>, fillcolor="#f8ddca"] ;
9 -> 10 ;
11 [label=<gini = 0.469<br/>samples = 24<br/>value = [15, 9]<br/>class = Aware>, fillcolor="#f5cdb0"] ;
10 -> 11 ;
12 [label=<gini = 0.0<br/>samples = 2<br/>value = [0, 2]<br/>class = Not Aware>, fillcolor="#399de5"] ;
10 -> 12 ;
13 [label=<device_make &le; 96.0<br/>gini = 0.124<br/>samples = 15<br/>value = [14, 1]<br/>class = Aware>, fillcolor="#e78a47"] ;
9 -> 13 ;
14 [label=<gini = 0.375<br/>samples = 4<br/>value = [3, 1]<br/>class = Aware>, fillcolor="#eeab7b"] ;
13 -> 14 ;
15 [label=<gini = 0.0<br/>samples = 11<br/>value = [11, 0]<br/>class = Aware>, fillcolor="#e58139"] ;
13 -> 15 ;
16 [label=<date &le; 5.5<br/>gini = 0.48<br/>samples = 40<br/>value = [16, 24]<br/>class = Not Aware>, fillcolor="#bddef6"] ;
0 -> 16 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
17 [label=<hour &le; 22.5<br/>gini = 0.498<br/>samples = 30<br/>value = [14, 16]<br/>class = Not Aware>, fillcolor="#e6f3fc"] ;
16 -> 17 ;
18 [label=<device_make &le; 67.0<br/>gini = 0.5<br/>samples = 28<br/>value = [14, 14]<br/>class = Aware>, fillcolor="#ffffff"] ;
17 -> 18 ;
19 [label=<gini = 0.497<br/>samples = 26<br/>value = [12, 14]<br/>class = Not Aware>, fillcolor="#e3f1fb"] ;
18 -> 19 ;
20 [label=<gini = 0.0<br/>samples = 2<br/>value = [2, 0]<br/>class = Aware>, fillcolor="#e58139"] ;
18 -> 20 ;
21 [label=<gini = 0.0<br/>samples = 2<br/>value = [0, 2]<br/>class = Not Aware>, fillcolor="#399de5"] ;
17 -> 21 ;
22 [label=<browser &le; 4.5<br/>gini = 0.32<br/>samples = 10<br/>value = [2, 8]<br/>class = Not Aware>, fillcolor="#6ab6ec"] ;
16 -> 22 ;
23 [label=<browser &le; 1.5<br/>gini = 0.198<br/>samples = 9<br/>value = [1, 8]<br/>class = Not Aware>, fillcolor="#52a9e8"] ;
22 -> 23 ;
24 [label=<gini = 0.32<br/>samples = 5<br/>value = [1, 4]<br/>class = Not Aware>, fillcolor="#6ab6ec"] ;
23 -> 24 ;
25 [label=<gini = 0.0<br/>samples = 4<br/>value = [0, 4]<br/>class = Not Aware>, fillcolor="#399de5"] ;
23 -> 25 ;
26 [label=<gini = 0.0<br/>samples = 1<br/>value = [1, 0]<br/>class = Aware>, fillcolor="#e58139"] ;
22 -> 26 ;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 07d4a84

Please sign in to comment.