Day | Outlook | Temperature | Humidity | Wind | PlayTennis |
---|---|---|---|---|---|
D1 | Sunny | Hot | High | Weak | No |
D2 | Sunny | Hot | High | Strong | No |
D3 | Overcast | Hot | High | Weak | Yes |
D4 | Rain | Mild | High | Weak | Yes |
D5 | Rain | Cool | Normal | Weak | Yes |
D6 | Rain | Cool | Normal | Strong | No |
D7 | Overcast | Cool | Normal | Strong | Yes |
D8 | Sunny | Mild | High | Weak | No |
D9 | Sunny | Cool | Normal | Weak | Yes |
D10 | Rain | Mild | Normal | Weak | Yes |
D11 | Sunny | Mild | Normal | Strong | Yes |
D12 | Overcast | Mild | High | Strong | Yes |
D13 | Overcast | Hot | Normal | Weak | Yes |
D14 | Rain | Mild | High | Strong | No |
Day | Outlook | Temperature | Humidity | Wind | PlayTennis |
---|---|---|---|---|---|
today | Sunny | Hot | Normal | Weak | ? |
tomorrow | Overcast | Mild | Normal | Weak | ? |
Day | Outlook | Temperature | Humidity | Wind | Play? |
---|---|---|---|---|---|
D9 | Sunny | Cool | Normal | Weak | Yes |
D11 | Sunny | Mild | Normal | Strong | Yes |
D1 | Sunny | Hot | High | Weak | No |
D2 | Sunny | Hot | High | Strong | No |
D8 | Sunny | Mild | High | Weak | No |
D3 | Overcast | Hot | High | Weak | Yes |
D7 | Overcast | Cool | Normal | Strong | Yes |
D12 | Overcast | Mild | High | Strong | Yes |
D13 | Overcast | Hot | Normal | Weak | Yes |
D4 | Rain | Mild | High | Weak | Yes |
D5 | Rain | Cool | Normal | Weak | Yes |
D10 | Rain | Mild | Normal | Weak | Yes |
D6 | Rain | Cool | Normal | Strong | No |
D14 | Rain | Mild | High | Strong | No |
Day | Outlook | Temperature | Humidity | Wind | PlayTennis |
---|---|---|---|---|---|
D9 | Sunny | Cool | Normal | Weak | Yes |
D5 | Rain | Cool | Normal | Weak | Yes |
D10 | Rain | Mild | Normal | Weak | Yes |
D13 | Overcast | Hot | Normal | Weak | Yes |
D3 | Overcast | Hot | High | Weak | Yes |
D4 | Rain | Mild | High | Weak | Yes |
D1 | Sunny | Hot | High | Weak | No |
D8 | Sunny | Mild | High | Weak | No |
D7 | Overcast | Cool | Normal | Strong | Yes |
D11 | Sunny | Mild | Normal | Strong | Yes |
D6 | Rain | Cool | Normal | Strong | No |
D12 | Overcast | Mild | High | Strong | Yes |
D2 | Sunny | Hot | High | Strong | No |
D14 | Rain | Mild | High | Strong | No |
$$
\ \ p(x)\ge 0, \qquad\int p(x)dx = 1 \ \
$$
| $\qquad \mbox{or}\qquad $ |
$$
\ \ p_\alpha\ge 0, \qquad \sum_\alpha p_\alpha = 1\ \
$$
|
$$
\ \ H[p] =-\int p(x)\ln\big[p(x)\big]dx \ \
$$
| $\qquad \mbox{or}\qquad $ |
$$
\ \ H[p] = -\sum_\alpha p_\alpha\ln\big[p_\alpha\big]\ \
$$
|
dot
neato
/ circo
/ twopi
dot
)
graph G { one -- two -- three -- four -- one /* run with * circo -Tpdf test.dot -o test.pdf * neato -Tpdf test.dot -o test.pdf * dot -Tpdf test.dot -o test.pdf */ }
digraph G { // digraph: directed graph rankdir=TD; // top-down, try LR node [penwidth=2.0] // for all nodes salary [shape="oval",color="#000099",fontcolor="#000099"] increase [shape="oval",color="#000099",fontcolor="#000099"] hours [shape="oval",color="#000099",fontcolor="#000099"] holidays [shape="oval",color="#000099",fontcolor="#000099"] retirement [shape="oval",color="#000099",fontcolor="#000099"] salary [label="salary"] increase [label="prospective wage increase"] hours [label="# working hours"] holidays [label="# holidays"] retirement [label="early retirement possible?"] good1 [shape="box",color="#009900",fontcolor="#009900"] good2 [shape="box",color="#009900",fontcolor="#009900"] good4 [shape="box",color="#009900",fontcolor="#009900"] bad1 [shape="box",color="#990000",fontcolor="#990000"] bad2 [shape="box",color="#990000",fontcolor="#990000"] bad4 [shape="box",color="#990000",fontcolor="#990000"] good1 [label="good"] good2 [label="good"] good4 [label="good"] bad1 [label="bad"] bad2 [label="bad"] bad4 [label="bad"] {rank=same; holidays; hours} // on same rank level {rank=same; bad1; retirement; good1; increase } salary -> holidays [label=" high"] holidays -> retirement [label=" <20"] holidays -> good1 [label=" >20"] retirement -> good2 [label=" yes"] retirement -> bad2 [label=" no"] salary -> hours [label=" low"] hours -> increase [label=" <35"] hours -> bad1 [label=" >35"] increase -> bad4 [label=" <4%"] increase -> good4 [label=" >4%"] /* some info * * http://www.graphviz.org/Documentation.php * dot -Tpdf test.dot -o test.pdf */ }