source: orange/Orange/regression/mean.py @ 10075:bf51529fbccd

Revision 10075:bf51529fbccd, 1000 bytes checked in by Lan Zagar <lan.zagar@…>, 2 years ago (diff)

Removed multiple locations of ConstantClassifier and moved its documentation.

Line 
1"""
2
3****
4Mean
5****
6
7.. index:: regression; mean
8
9
10Accuracy of classifiers is often compared to the "default accuracy".
11For regression, that is the accuracy of a classifier which predicts for
12all instances the mean value of all observed class values in the
13training data. To fit into the standard schema, even this algorithm
14is provided in form of the usual learner-classifier pair.
15Learning is done by :obj:`MeanLearner` and the classifier it
16constructs is an instance of :obj:`ConstantClassifier`.
17
18This is the regression counterpart of the
19:obj:`Orange.classification.majority.MajorityLearner`, which can be
20used for classification problems.
21
22.. rubric:: Examples
23
24This "learning algorithm" will most often be used to establish
25whether some other learning algorithm is better than "nothing".
26Here's a simple example.
27
28:download:`mean-regression.py <code/mean-regression.py>`:
29
30.. literalinclude:: code/mean-regression.py
31    :lines: 7-
32
33"""
34
35from Orange.core import MajorityLearner as MeanLearner
Note: See TracBrowser for help on using the repository browser.