source: orange/docs/widgets/rst/classify/cn2.rst @ 11359:8d54e79aa135

Revision 11359:8d54e79aa135, 2.6 KB checked in by Ales Erjavec <ales.erjavec@…>, 14 months ago (diff)

Cleanup of 'Widget catalog' documentation.

Fixed rst text formating, replaced dead hardcoded reference links (now using
:ref:), etc.

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
33is based on CN2 algorithm, however the variety of options in widget allows
34user to implement different kinds of cover-and-remove rule learning
35algorithms.
36
37.. image:: images/CN2.png
38   :alt: CN2 Widget
39
40In the first box user can select between three evaluation functions. The
41first, :obj:`Laplace`, was originally used in CN2 algorithm. The second
42function is :obj:`m-estimate` of probability (used in later versions of
43CN2) and the last is :obj:`WRACC` (weighted relative accuracy), used
44in CN2-SD algorithm.
45
46In the second box the user can define pre-prunning of rules. The first
47parameter, :obj:`Alpha (vs. default rule)`, is a parameter of LRS
48(likelihood ratio statistics). Alpha determines required significance of
49a rule when compared to the default rule. The second parameter,
50:obj:`Stopping Alpha (vs. parent rule)`, is also the parameter of LRS,
51only that in this case the rule is compared to its parent rule: it verifies
52whether the last specialization of the rule is significant enough.
53The third parameter, :obj:`Minimum coverage` specifies the minimal number
54of examples that each induced rule must cover. The last parameter,
55:obj:`Maximal rule length` limits the length of induced rules.
56
57 :obj:`Beam width` is the number of best rules that are, in each step,
58 further specialized. Other rules are discarded.
59
60Covering and removing examples can be done in two different ways.
61:obj:`Exclusive covering`, as in the original CN2, removes all covered
62examples and continues learning on remaining examples. Alternative type of
63covering is :obj:`weighted covering`, which only decreases weight of covered
64examples instead of removing them. The parameter of weighted covering is
65the multiplier; the weights of all covered examples are multiplied by this
66number.
67
68Any changes of arguments must be confirmed by pushing :obj:`Apply` before
69they are propagated through the schema.
70
71
72
73Examples
74--------
75
76The figure shows a simple use of the widget. Rules are learned with
77CN2 widget and the classifier is sent to the :ref:`CN2 Rules Viewer`.
78
79.. image:: images/CN2-Interaction-S.png
80   :alt: CN2 - Interaction
Note: See TracBrowser for help on using the repository browser.