CN2 algorithm
The CN2 algorithm is a common "if" question in programing. It is an excellent factor in programing.
Decision Tree
A decision tree can be defined as a set of rules. The CN2 algorithm is a type of "if" function that has special rules. These sets of rules will take a given variable, test the variable by the rule, and then make a decision from there. For example:
Lets say that we want to test to see if we will walk to work or if we need to take a taxi.
If you are in a hurry, and if it is less than 5 degrees outside, and if it is stormy outside, then take a taxi. Otherwise, walk.
This is a very basic version of the CN2 algorithm. Unfortunately, computers don't yet have the capability to understand English commands. Take this example, as something closer to what computers could understand.
if (InHurry = yes)and
(Tempature < 5)and
(Weather = stormy)
then TakeTaxi