CN2 algorithm
![]() | This article or section is in a state of significant expansion or restructuring. You are welcome to assist in its construction by editing it as well. If this article or section has not been edited in several days, please remove this template. If you are the editor who added this template and you are actively editing, please be sure to replace this template with {{in use}} during the active editing session. Click on the link for template parameters to use.
This article was last edited by HaloPwnage (talk | contribs) 18 years ago. (Update timer) |
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