Index: Orange/regression/mean.py
===================================================================
 Orange/regression/mean.py (revision 10075)
+++ Orange/regression/mean.py (revision 10388)
@@ 1,35 +1,1 @@
"""

****
Mean
****

.. index:: regression; mean


Accuracy of classifiers is often compared to the "default accuracy".
For regression, that is the accuracy of a classifier which predicts for
all instances the mean value of all observed class values in the
training data. To fit into the standard schema, even this algorithm
is provided in form of the usual learnerclassifier pair.
Learning is done by :obj:`MeanLearner` and the classifier it
constructs is an instance of :obj:`ConstantClassifier`.

This is the regression counterpart of the
:obj:`Orange.classification.majority.MajorityLearner`, which can be
used for classification problems.

.. rubric:: Examples

This "learning algorithm" will most often be used to establish
whether some other learning algorithm is better than "nothing".
Here's a simple example.

:download:`meanregression.py `:

.. literalinclude:: code/meanregression.py
 :lines: 7

"""

from Orange.core import MajorityLearner as MeanLearner
Index: docs/reference/rst/Orange.classification.majority.rst
===================================================================
 docs/reference/rst/Orange.classification.majority.rst (revision 10368)
+++ docs/reference/rst/Orange.classification.majority.rst (revision 10388)
@@ 8,8 +8,10 @@
pair: classification; majority classifier
Accuracy of classifiers is often compared to the "default accuracy",
+Accuracy of classifiers is often compared with the "default accuracy",
that is, the accuracy of a classifier which classifies all instances
to the majority class. The training of such classifier consists of
computing the class distribution and its modus. The model is represented as an instance of :obj:`Orange.classification.ConstantClassifier`.
+computing the class distribution and its modus. The model is
+represented as an instance of
+:obj:`Orange.classification.ConstantClassifier`.
.. class:: MajorityLearner
@@ 20,5 +22,5 @@
An estimator constructor that can be used for estimation of
 class probabilities. If left None, probability of each class is
+ class probabilities. If left ``None``, probability of each class is
estimated as the relative frequency of instances belonging to
this class.
Index: docs/reference/rst/Orange.regression.mean.rst
===================================================================
 docs/reference/rst/Orange.regression.mean.rst (revision 9372)
+++ docs/reference/rst/Orange.regression.mean.rst (revision 10388)
@@ 3,3 +3,20 @@
################
.. automodule:: Orange.regression.mean
+.. py:currentmodule:: Orange.regression.mean
+
+.. index:: regression; mean
+
+Accuracy of a regressor is often compared with the accuracy achieved
+by always predicting the averag value. The "learning algorithm"
+computes the average and represents it with a regressor of type
+:obj:`Orange.classification.ConstantClassifier`.
+
+.. rubric:: Examples
+
+The following example compares the mean squared error of always
+predicting the average with the error of a tree learner.
+
+:download:`meanregression.py `:
+
+.. literalinclude:: code/meanregression.py
+ :lines: 7