source: orange/Orange/regression/mean.py @ 9994:1073e0304a87

Revision 9994:1073e0304a87, 1.0 KB checked in by Matija Polajnar <matija.polajnar@…>, 2 years ago (diff)

Remove links from documentation to datasets. Remove datasets reference directory.

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
36from Orange.core import DefaultClassifier as ConstantClassifier
Note: See TracBrowser for help on using the repository browser.