Skip to content

Commit 858dc34

Browse files
committed
Updated DT tutorial to account for depth
1 parent 5ab8bbe commit 858dc34

34 files changed

+2156
-136
lines changed

.DS_Store

0 Bytes
Binary file not shown.

Sklearn/.DS_Store

0 Bytes
Binary file not shown.

Sklearn/DecisionTrees/.DS_Store

0 Bytes
Binary file not shown.

Sklearn/DecisionTrees/.ipynb_checkpoints/DecisionTreeAnatomy-Depth-Not-4-sharing-checkpoint.ipynb

Lines changed: 991 additions & 0 deletions
Large diffs are not rendered by default.

Sklearn/DecisionTrees/.ipynb_checkpoints/DecisionTreeAnatomy-checkpoint.ipynb

Lines changed: 50 additions & 62 deletions
Large diffs are not rendered by default.

Sklearn/DecisionTrees/DecisionTreeAnatomy-Depth-Not-4-sharing.ipynb

Lines changed: 991 additions & 0 deletions
Large diffs are not rendered by default.

Sklearn/DecisionTrees/DecisionTreeAnatomy.ipynb

Lines changed: 28 additions & 74 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
digraph Tree {
2+
node [shape=box, style=filled,fillcolor="#FFFFFF"] ;
3+
0 [label=<<FONT COLOR="#D2691E">petal length (cm) &le; 2.45<br/>gini = 0.665<br/>samples = 112<br/>value = [38, 40, 34]<br/>class = versicolor</FONT>>] ;
4+
1 [label=<<FONT COLOR="#008000">gini = 0.0<br/>samples = 38<br/>value = [38, 0, 0]<br/>class = setosa</FONT>>] ;
5+
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
6+
2 [label=<<FONT COLOR="#008000">gini = 0.497<br/>samples = 74<br/>value = [0, 40, 34]<br/>class = versicolor</FONT>>] ;
7+
0 -> 2 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
8+
}
Binary file not shown.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
digraph Tree {
2+
node [shape=box, style=filled,fillcolor="#FFFFFF"] ;
3+
0 [label=<<FONT COLOR="#D2691E">petal length (cm) &le; 2.45<br/>gini = 0.665<br/>samples = 112<br/>value = [38, 40, 34]<br/>class = versicolor</FONT>>] ;
4+
1 [label=<<FONT COLOR="#008000">gini = 0.0<br/>samples = 38<br/>value = [38, 0, 0]<br/>class = setosa</FONT>>] ;
5+
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
6+
2 [label=<<FONT COLOR="#0000FF">petal length (cm) &le; 4.95<br/>gini = 0.497<br/>samples = 74<br/>value = [0, 40, 34]<br/>class = versicolor</FONT>>] ;
7+
0 -> 2 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
8+
3 [label=<<FONT COLOR="#0000FF">petal length (cm) &le; 4.75<br/>gini = 0.136<br/>samples = 41<br/>value = [0, 38, 3]<br/>class = versicolor</FONT>>] ;
9+
2 -> 3 ;
10+
4 [label=<<FONT COLOR="#008000">gini = 0.056<br/>samples = 35<br/>value = [0, 34, 1]<br/>class = versicolor</FONT>>] ;
11+
3 -> 4 ;
12+
5 [label=<<FONT COLOR="#008000">gini = 0.444<br/>samples = 6<br/>value = [0, 4, 2]<br/>class = versicolor</FONT>>] ;
13+
3 -> 5 ;
14+
6 [label=<<FONT COLOR="#0000FF">petal length (cm) &le; 5.15<br/>gini = 0.114<br/>samples = 33<br/>value = [0, 2, 31]<br/>class = virginica</FONT>>] ;
15+
2 -> 6 ;
16+
7 [label=<<FONT COLOR="#008000">gini = 0.408<br/>samples = 7<br/>value = [0, 2, 5]<br/>class = virginica</FONT>>] ;
17+
6 -> 7 ;
18+
8 [label=<<FONT COLOR="#008000">gini = 0.0<br/>samples = 26<br/>value = [0, 0, 26]<br/>class = virginica</FONT>>] ;
19+
6 -> 8 ;
20+
}

0 commit comments

Comments
 (0)