source: orange/docs/reference/rst/Orange.classification.majority.rst @ 10388:c6f2a5ae8087

Revision 10388:c6f2a5ae8087, 1.4 KB checked in by janezd <janez.demsar@…>, 2 years ago (diff)

Moved documentation about regression.mean to rst and simplified it; minor fixes in classification.majority

Line 
1.. py:currentmodule:: Orange.classification.majority
2
3***********************
4Majority (``majority``)
5***********************
6
7.. index:: majority classifier
8   pair: classification; majority classifier
9
10Accuracy of classifiers is often compared with the "default accuracy",
11that is, the accuracy of a classifier which classifies all instances
12to the majority class. The training of such classifier consists of
13computing the class distribution and its modus. The model is
14represented as an instance of
15:obj:`Orange.classification.ConstantClassifier`.
16
17.. class:: MajorityLearner
18
19    MajorityLearner has two components, which are seldom used.
20
21    .. attribute:: estimator_constructor
22   
23        An estimator constructor that can be used for estimation of
24        class probabilities. If left ``None``, probability of each class is
25        estimated as the relative frequency of instances belonging to
26        this class.
27       
28    .. attribute:: apriori_distribution
29   
30        Apriori class distribution that is passed to estimator
31        constructor if one is given.
32
33Example
34========
35
36This "learning algorithm" will most often be used as a baseline,
37that is, to determine if some other learning algorithm provides
38any information about the class (:download:`majority-classification.py <code/majority-classification.py>`):
39
40.. literalinclude:: code/majority-classification.py
41    :lines: 7-
Note: See TracBrowser for help on using the repository browser.