source: orange/docs/widgets/rst/classify/majority.rst @ 11778:ecd4beec2099

Revision 11778:ecd4beec2099, 1.7 KB checked in by Ales Erjavec <ales.erjavec@…>, 5 months ago (diff)

Use new SVG icons in the widget documentation.

Line 
1.. _Majority:
2
3Majority Learner
4================
5
6.. image:: ../../../../Orange/OrangeWidgets/Classify/icons/Majority.svg
7
8A Learner that returns the majority class, disregarding the example's
9attributes.
10
11Signals
12-------
13
14Inputs:
15
16
17   - Examples (ExampleTable)
18      A table with training examples
19
20
21Outputs:
22
23   - Learner
24      The "learning" algorithm.
25
26   - Classifier
27      The classifier
28
29
30Signal :obj:`Classifier` sends data only if the learning data (signal
31:obj:`Examples`) is present.
32
33Description
34-----------
35
36This widget provides a graphical interface to a learner which produces a
37classifier that always predicts the majority class. When asked for
38probabilities, it will return the relative frequencies of the classes
39in the training set. When there are two or more majority classes, the
40classifier chooses the predicted class randomly, but always returns the
41same class for a particular example.
42
43The widget is typically used to compare other learning algorithms with
44the default classification accuracy.
45
46As all other widgets for classification, this one provides a learner and
47classifier, the former can be fed into widgets for testing learners, while
48the classifier itself is, well, not very useful.
49
50
51.. image:: images/Majority.png
52   :alt: Majority
53
54The only option is the name under which it will appear in, say,
55:ref:`Test Learners`. The default name is "Majority". When you change it,
56you need to click :obj:`Apply`.
57
58Examples
59--------
60
61In a typical use of this widget, it would be connected to
62:ref:`Test Learners` to compare the scores of other learning algorithms
63(such as kNN, in this schema) with the default scores.
64
65.. image:: images/Majority-Knn-SchemaLearner.png
66   :alt: A Schema with Majority Classifier
Note: See TracBrowser for help on using the repository browser.