source: orange/docs/widgets/rst/classify/cn2.rst @ 11050:e3c4699ca155

Revision 11050:e3c4699ca155, 2.6 KB checked in by Miha Stajdohar <miha.stajdohar@…>, 16 months ago (diff)

Widget docs From HTML to Sphinx.

Line 
1.. _CN2 Rules:
2
3CN2 Rule Learner
4================
5
6.. image:: ../icons/CN2.png
7
8CN2: A widget for learning an unordered set of classification if-then rules.
9
10Signals
11-------
12
13Inputs:
14
15
16   - Examples (ExampleTable)
17
18
19Outputs:
20
21   - Learner (orange.Learner)
22   - Classifier (orange.Classifier)
23      A rule classifier induced from given data.
24   - CN2UnorderedClassifier (orngCN2.CN2UnorderedClassifier)
25      The same as "Classifier".
26
27
28Description
29-----------
30
31
32Use this widget to learn a set of if-then rules from data. The algorithm is based on CN2 algorithm, however the variety of options in widget allows user to implement different kinds of cover-and-remove rule learning algorithms.
33
34.. image:: images/CN2.png
35   :alt: CN2 Widget
36
37In the first box user can select between three evaluation functions. The first, :obj:`Laplace`, was originally used in CN2 algorithm. The second function is :obj:`m-estimate` of probability (used in later versions of CN2) and the last is :obj:`WRACC` (weighted relative accuracy), used in CN2-SD algorithm.
38
39In the second box the user can define pre-prunning of rules. The first parameter, :obj:`Alpha (vs. default rule)`, is a parameter of LRS (likelihood ratio statistics). Alpha determines required significance of a rule when compared to the default rule. The second parameter, :obj:`Stopping Alpha (vs. parent rule)`, is also the parameter of LRS, only that in this case the rule is compared to its parent rule: it verifies whether the last specialization of the rule is significant enough. The third parameter, :obj:`Minimum coverage` specifies the minimal number of examples that each induced rule must cover. The last parameter, :obj:`Maximal rule length` limits the length of induced rules.
40
41 :obj:`Beam width` is the number of best rules that are, in each step, further specialized. Other rules are discarded.
42
43Covering and removing examples can be done in two different ways. :obj:`Exclusive covering`, as in the original CN2, removes all covered examples and continues learning on remaining examples. Alternative type of covering is :obj:`weighted covering`, which only decreases weight of covered examples instead of removing them. The parameter of weighted covering is the multiplier; the weights of all covered examples are multiplied by this number.
44
45Any changes of arguments must be confirmed by pushing :obj:`Apply` before they are propagated through the schema.
46
47
48
49Examples
50--------
51
52The figure shows a simple use of the widget. Rules are learned with CN2 widget and the classifier is sent to the Rules Viewer.
53
54.. image:: images/CN2-Interaction-S.png
55   :alt: CN2 - Interaction
Note: See TracBrowser for help on using the repository browser.