Skip to content

Commit 2be206d

Browse files
committed
Created information gain section and idea for figure for it
1 parent 8926904 commit 2be206d

11 files changed

+166
-3
lines changed

.DS_Store

0 Bytes
Binary file not shown.

Sklearn/.DS_Store

2 KB
Binary file not shown.

Sklearn/DecisionTrees/.DS_Store

0 Bytes
Binary file not shown.

Sklearn/DecisionTrees/DecisionTreeAnatomy.ipynb

Lines changed: 126 additions & 3 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+
}
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] ;
3+
0 [label="petal length (cm) <= 2.45\nentropy = 1.582\nsamples = 112\nvalue = [38, 40, 34]\nclass = versicolor"] ;
4+
1 [label="entropy = 0.0\nsamples = 38\nvalue = [38, 0, 0]\nclass = setosa"] ;
5+
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
6+
2 [label="entropy = 0.995\nsamples = 74\nvalue = [0, 40, 34]\nclass = versicolor"] ;
7+
0 -> 2 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
8+
}
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] ;
3+
0 [label="petal length (cm) <= 2.45\ngini = 0.665\nsamples = 112\nvalue = [38, 40, 34]\nclass = versicolor"] ;
4+
1 [label="gini = 0.0\nsamples = 38\nvalue = [38, 0, 0]\nclass = setosa"] ;
5+
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
6+
2 [label="gini = 0.497\nsamples = 74\nvalue = [0, 40, 34]\nclass = versicolor"] ;
7+
0 -> 2 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
8+
}
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] ;
3+
0 [label="petal length (cm) <= 2.45\nentropy = 1.582\nsamples = 112\nvalue = [38, 40, 34]\nclass = versicolor"] ;
4+
1 [label="entropy = 0.0\nsamples = 38\nvalue = [38, 0, 0]\nclass = setosa"] ;
5+
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
6+
2 [label="entropy = 0.995\nsamples = 74\nvalue = [0, 40, 34]\nclass = versicolor"] ;
7+
0 -> 2 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
8+
}
105 KB
Loading
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] ;
3+
0 [label="petal length (cm) <= 2.45\ngini = 0.665\nsamples = 112\nvalue = [38, 40, 34]\nclass = versicolor"] ;
4+
1 [label="gini = 0.0\nsamples = 38\nvalue = [38, 0, 0]\nclass = setosa"] ;
5+
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
6+
2 [label="gini = 0.497\nsamples = 74\nvalue = [0, 40, 34]\nclass = versicolor"] ;
7+
0 -> 2 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
8+
}

0 commit comments

Comments
 (0)