Skip to content

Commit

Permalink
Merge pull request #18 from 10Academy-B6-W2/ml_ab_test
Browse files Browse the repository at this point in the history
Ml ab test
  • Loading branch information
tigisthailay committed Sep 3, 2022
2 parents b1fa65b + 8dbfd32 commit 1939d70
Show file tree
Hide file tree
Showing 11 changed files with 1,026 additions and 1,315 deletions.
1,019 changes: 495 additions & 524 deletions notebooks/.ipynb_checkpoints/ML_AB_Testing-checkpoint.ipynb

Large diffs are not rendered by default.

64 changes: 36 additions & 28 deletions notebooks/AbTestDecisionTree.dot
Original file line number Diff line number Diff line change
@@ -1,57 +1,65 @@
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 [label=<hour &le; 20.5<br/>gini = 0.497<br/>samples = 932<br/>value = [504, 428]<br/>class = Aware>, fillcolor="#fbece1"] ;
1 [label=<device_make &le; 91.0<br/>gini = 0.495<br/>samples = 889<br/>value = [488, 401]<br/>class = Aware>, fillcolor="#fae9dc"] ;
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"] ;
2 [label=<device_make &le; 68.5<br/>gini = 0.497<br/>samples = 847<br/>value = [458, 389]<br/>class = Aware>, fillcolor="#fbece1"] ;
1 -> 2 ;
3 [label=<hour &le; 12.5<br/>gini = 0.494<br/>samples = 738<br/>value = [410, 328]<br/>class = Aware>, fillcolor="#fae6d7"] ;
3 [label=<hour &le; 12.5<br/>gini = 0.494<br/>samples = 765<br/>value = [424, 341]<br/>class = Aware>, fillcolor="#fae6d8"] ;
2 -> 3 ;
4 [label=<gini = 0.485<br/>samples = 374<br/>value = [219, 155]<br/>class = Aware>, fillcolor="#f7dac5"] ;
4 [label=<gini = 0.486<br/>samples = 386<br/>value = [225, 161]<br/>class = Aware>, fillcolor="#f8dbc7"] ;
3 -> 4 ;
5 [label=<gini = 0.499<br/>samples = 364<br/>value = [191, 173]<br/>class = Aware>, fillcolor="#fdf3ec"] ;
5 [label=<gini = 0.499<br/>samples = 379<br/>value = [199, 180]<br/>class = Aware>, fillcolor="#fdf3ec"] ;
3 -> 5 ;
6 [label=<date &le; 2.5<br/>gini = 0.483<br/>samples = 76<br/>value = [31, 45]<br/>class = Not Aware>, fillcolor="#c1e1f7"] ;
6 [label=<date &le; 6.5<br/>gini = 0.485<br/>samples = 82<br/>value = [34, 48]<br/>class = Not Aware>, fillcolor="#c5e2f7"] ;
2 -> 6 ;
7 [label=<gini = 0.422<br/>samples = 43<br/>value = [13, 30]<br/>class = Not Aware>, fillcolor="#8fc7f0"] ;
7 [label=<gini = 0.494<br/>samples = 76<br/>value = [34, 42]<br/>class = Not Aware>, fillcolor="#d9ecfa"] ;
6 -> 7 ;
8 [label=<gini = 0.496<br/>samples = 33<br/>value = [18, 15]<br/>class = Aware>, fillcolor="#fbeade"] ;
8 [label=<gini = 0.0<br/>samples = 6<br/>value = [0, 6]<br/>class = Not Aware>, fillcolor="#399de5"] ;
6 -> 8 ;
9 [label=<hour &le; 13.5<br/>gini = 0.414<br/>samples = 41<br/>value = [29, 12]<br/>class = Aware>, fillcolor="#f0b58b"] ;
9 [label=<hour &le; 13.5<br/>gini = 0.408<br/>samples = 42<br/>value = [30, 12]<br/>class = Aware>, fillcolor="#efb388"] ;
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"] ;
13 [label=<device_make &le; 96.0<br/>gini = 0.117<br/>samples = 16<br/>value = [15, 1]<br/>class = Aware>, fillcolor="#e78946"] ;
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"] ;
15 [label=<gini = 0.0<br/>samples = 12<br/>value = [12, 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"] ;
16 [label=<experiment &le; 0.5<br/>gini = 0.467<br/>samples = 43<br/>value = [16, 27]<br/>class = Not Aware>, fillcolor="#aed7f4"] ;
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"] ;
17 [label=<date &le; 4.5<br/>gini = 0.388<br/>samples = 19<br/>value = [5, 14]<br/>class = Not Aware>, fillcolor="#80c0ee"] ;
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"] ;
18 [label=<device_make &le; 33.5<br/>gini = 0.5<br/>samples = 6<br/>value = [3, 3]<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"] ;
19 [label=<gini = 0.48<br/>samples = 5<br/>value = [2, 3]<br/>class = Not Aware>, fillcolor="#bddef6"] ;
18 -> 19 ;
20 [label=<gini = 0.0<br/>samples = 2<br/>value = [2, 0]<br/>class = Aware>, fillcolor="#e58139"] ;
20 [label=<gini = 0.0<br/>samples = 1<br/>value = [1, 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"] ;
21 [label=<device_make &le; 69.0<br/>gini = 0.26<br/>samples = 13<br/>value = [2, 11]<br/>class = Not Aware>, fillcolor="#5dafea"] ;
17 -> 21 ;
22 [label=<hour &le; 21.5<br/>gini = 0.32<br/>samples = 10<br/>value = [2, 8]<br/>class = Not Aware>, fillcolor="#6ab6ec"] ;
16 -> 22 ;
23 [label=<experiment &le; 0.5<br/>gini = 0.444<br/>samples = 6<br/>value = [2, 4]<br/>class = Not Aware>, fillcolor="#9ccef2"] ;
22 -> 23 ;
24 [label=<gini = 0.0<br/>samples = 1<br/>value = [0, 1]<br/>class = Not Aware>, fillcolor="#399de5"] ;
23 -> 24 ;
25 [label=<gini = 0.48<br/>samples = 5<br/>value = [2, 3]<br/>class = Not Aware>, fillcolor="#bddef6"] ;
23 -> 25 ;
26 [label=<gini = 0.0<br/>samples = 4<br/>value = [0, 4]<br/>class = Not Aware>, fillcolor="#399de5"] ;
22 -> 26 ;
22 [label=<gini = 0.165<br/>samples = 11<br/>value = [1, 10]<br/>class = Not Aware>, fillcolor="#4da7e8"] ;
21 -> 22 ;
23 [label=<gini = 0.5<br/>samples = 2<br/>value = [1, 1]<br/>class = Aware>, fillcolor="#ffffff"] ;
21 -> 23 ;
24 [label=<date &le; 4.5<br/>gini = 0.497<br/>samples = 24<br/>value = [11, 13]<br/>class = Not Aware>, fillcolor="#e1f0fb"] ;
16 -> 24 ;
25 [label=<device_make &le; 46.5<br/>gini = 0.408<br/>samples = 7<br/>value = [2, 5]<br/>class = Not Aware>, fillcolor="#88c4ef"] ;
24 -> 25 ;
26 [label=<gini = 0.278<br/>samples = 6<br/>value = [1, 5]<br/>class = Not Aware>, fillcolor="#61b1ea"] ;
25 -> 26 ;
27 [label=<gini = 0.0<br/>samples = 1<br/>value = [1, 0]<br/>class = Aware>, fillcolor="#e58139"] ;
25 -> 27 ;
28 [label=<date &le; 5.5<br/>gini = 0.498<br/>samples = 17<br/>value = [9, 8]<br/>class = Aware>, fillcolor="#fcf1e9"] ;
24 -> 28 ;
29 [label=<gini = 0.42<br/>samples = 10<br/>value = [7, 3]<br/>class = Aware>, fillcolor="#f0b78e"] ;
28 -> 29 ;
30 [label=<gini = 0.408<br/>samples = 7<br/>value = [2, 5]<br/>class = Not Aware>, fillcolor="#88c4ef"] ;
28 -> 30 ;
}
Binary file modified notebooks/AbTestDecisionTree.png
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 1939d70

Please sign in to comment.