The following is a decision tree to predict the Weather.
The algorithm starts at the root node, tests the selected attributes on the intermediate nodes and generates branches according to the output of the tests.
Each non leaf node of the decision tree denotes a test on an attribute each branch represents the output of a test and each leaf (or terminal) node holds a class label.
A decision tree to predict the Weather and a visual representation
X[0] - is the first feature variable (WEATHER) X[2] - is the third feature variable (HUMIDITY) X[3] - is the 4th feature variable (WIND)
ENTROPY is the entropy value of the node
SAMPLES is the number of samples in the node ie; for example; 14 is the 1st node (root node) indicates the number of samples in the training set
VALUE indicates the number of samples of different types eg; in the root node, 5 indicates the number of "no" samples and 9 indicates the number of "yes" samples.