Jump to content

CN2 algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by HaloPwnage (talk | contribs) at 21:43, 13 January 2007. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


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. 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