source: orange/docs/reference/rst/Orange.classification.majority.rst @ 10368:28f5cab86b85

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

Moved documentation for classification.majority to rst and polished it

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 to 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 represented as an instance of :obj:`Orange.classification.ConstantClassifier`.
14
15.. class:: MajorityLearner
16
17    MajorityLearner has two components, which are seldom used.
18
19    .. attribute:: estimator_constructor
20   
21        An estimator constructor that can be used for estimation of
22        class probabilities. If left None, probability of each class is
23        estimated as the relative frequency of instances belonging to
24        this class.
25       
26    .. attribute:: apriori_distribution
27   
28        Apriori class distribution that is passed to estimator
29        constructor if one is given.
30
31Example
32========
33
34This "learning algorithm" will most often be used as a baseline,
35that is, to determine if some other learning algorithm provides
36any information about the class (:download:`majority-classification.py <code/majority-classification.py>`):
37
38.. literalinclude:: code/majority-classification.py
39    :lines: 7-
Note: See TracBrowser for help on using the repository browser.