source: orange/Orange/doc/modules/orngCN2.htm @ 9671:a7b056375472

Revision 9671:a7b056375472, 4.8 KB checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1<html>
2<head>
3<link rel=stylesheet href="../style.css" type="text/css">
4</head>
5<body>
6
7
8<h1>orngCN2: Orange CN2 Rule Learning Module</h1>
9<index name="modules+classification rules">
10
11<P>Module orngCN2 implements several variations of well-known CN2 rule learning algorithm and some additional functions to ease the work with rules described in the last section. </p>
12<p>
13All variations of CN2 are implemented by by wrapping <code>orange.RuleLearner</code> class. Note that <code>orange.RuleLearner</code> class contains many replacable components. Each CN2 learner class in this module changes some of these components to reflect the required behaviour. Thus, in the description of each class, we mention only components that differ from default values (see <a href="../reference/RuleLearner.htm">Rule Learning</a>).</p>
14
15<h2>Original CN2 Learner</h2>
16<index name="classifiers/CN2">
17
18<p><code>CN2Learner</code> is a class that implements classical CN2 (see Clark and Niblett; 1988). It learns a set of ordered rules, which means that classificator must try these rules in the same order as they were learned. </p>
19
20<p class=section>Specific components</p>
21<dl class=attributes>
22All components are the same as default values of class <code>orange.RuleLearner</code>. </d1>
23
24<h2>Unordered CN2</h2>
25<p><code>CN2UnorderedLearner</code> class implements CN2 unordered (see Clark and Boswell; 1991). It learns a set of unordered rules - classification from rules does not assume ordering of rules - and returns a <code>CN2UnorderedClassifier</code>. In fact, learning rules is quite similar to learning in classical CN2, where the process of learning of rules is separated to learning rules for each class, which is implemented in class' <code>__call__</code> function. Learning of rules for each class uses a slightly changed version of classical CN2 algorithm.</p>
26
27<p class=section>Specific components</p>
28<dl class=attributes>
29  <dt>evaluator</dt>
30  <dd>Rules are evaluated with Laplace's rule of successin implemented in <code>orange.RuleEvaluator_Laplace</code></dd></dl>
31
32<h2>CN2-SD (Subgroup discovery)</h2>
33<index name="modules/subgroup discovery">
34
35<p> <code>CN2SDUnorderedLearner</code> class implements CN2-SD (see Lavrac et al.; 2004). It learns a set of unordered rules, which is the same as <code>CN2UnorderedLearner</code>. The difference between classical CN2 unordered and CN2-SD is selection of specific evaluation function and covering function, as it is mentioned in Specific components section. </p>
36
37<p class=section>Specific components</p>
38<dl class=attributes>
39  <dt>evaluator</dt>
40  <dd>Rules are evaluated with <code>WRACCEvaluator</code> class that implements weighted relative accuracy.</code></dd>
41  <dt>coverAndRemove</dt>
42  <dd>Removing of examples in CN2-SD is not exclusive but it lowers the weight of covered examples. By default, this class uses <code>CovererAndRemover_multWeights</code> with multiplication factor set to 0.7. Alternative class for "weighted" covering is <code>CovererAndRemover_addWeights</code> that follows the principle of additive correction of weights.</dd></dl>
43
44<h2>Miscellaneous functions</h2>
45
46<p class=section><code> ruleToString </code></p>
47This function writes a string presentation of rule in human readable format. It has two parameters; the first is <code>rule</code> which is obvious and the second is <code>showDistribution</code> for selecting whether presentation should also contain the distribution of covered examples. </p>
48
49<p class=section><code> WRACCEvaluator </code></p>
50This class implements WRACC (weighted relative accuracy) evaluation function.
51
52<p class=section><code> mEstimate </code></p>
53This class implements m-estimate of probability rule evaluation function. It has one parameter <code>m</code>.
54
55<p class=section><code> CovererAndRemover_multWeights </code></p>
56This class implements "weighted" covering and removing of examples. The weights of examples are multiplied by parameter <code>mult</code>.
57
58<p class=section><code> CovererAndRemover_addWeights </code></p>
59This class also implements "weighted" covering and removing of examples following additive weights principle.
60
61<H2>References</H2>
62<p>Clark, Niblett. <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.53.9180">The CN2 Induction Algorithm</a>. Machine Learning 3(4):261--284, 1989. </p>
63<p>Clark, Boswell. <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.24.1700">Rule Induction with CN2: Some Recent Improvements</a>. In Machine Learning - EWSL-91. Proceedings of the European Working Session on Learning., pages 151--163, Porto, Portugal, March 1991.</p>
64<p>
65<p>Lavrac, Kavsek, Flach, Todorovski: <a href="http://jmlr.csail.mit.edu/papers/volume5/lavrac04a/lavrac04a.pdf">Subgroup Discovery with CN2-SD</a>. Journal of Machine Learning Research 5: 153-188, 2004.
66
67</body>
68</html> 
Note: See TracBrowser for help on using the repository browser.