Changeset 10388:c6f2a5ae8087 in orange
 Timestamp:
 02/27/12 23:21:32 (2 years ago)
 Branch:
 default
 Children:
 10389:8d7ba785b51c, 10394:962c24741ced
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

Orange/regression/mean.py
r10075 r10388 1 """2 3 ****4 Mean5 ****6 7 .. index:: regression; mean8 9 10 Accuracy of classifiers is often compared to the "default accuracy".11 For regression, that is the accuracy of a classifier which predicts for12 all instances the mean value of all observed class values in the13 training data. To fit into the standard schema, even this algorithm14 is provided in form of the usual learnerclassifier pair.15 Learning is done by :obj:`MeanLearner` and the classifier it16 constructs is an instance of :obj:`ConstantClassifier`.17 18 This is the regression counterpart of the19 :obj:`Orange.classification.majority.MajorityLearner`, which can be20 used for classification problems.21 22 .. rubric:: Examples23 24 This "learning algorithm" will most often be used to establish25 whether some other learning algorithm is better than "nothing".26 Here's a simple example.27 28 :download:`meanregression.py <code/meanregression.py>`:29 30 .. literalinclude:: code/meanregression.py31 :lines: 732 33 """34 35 1 from Orange.core import MajorityLearner as MeanLearner 
docs/reference/rst/Orange.classification.majority.rst
r10368 r10388 8 8 pair: classification; majority classifier 9 9 10 Accuracy of classifiers is often compared tothe "default accuracy",10 Accuracy of classifiers is often compared with the "default accuracy", 11 11 that is, the accuracy of a classifier which classifies all instances 12 12 to the majority class. The training of such classifier consists of 13 computing the class distribution and its modus. The model is represented as an instance of :obj:`Orange.classification.ConstantClassifier`. 13 computing the class distribution and its modus. The model is 14 represented as an instance of 15 :obj:`Orange.classification.ConstantClassifier`. 14 16 15 17 .. class:: MajorityLearner … … 20 22 21 23 An estimator constructor that can be used for estimation of 22 class probabilities. If left None, probability of each class is24 class probabilities. If left ``None``, probability of each class is 23 25 estimated as the relative frequency of instances belonging to 24 26 this class. 
docs/reference/rst/Orange.regression.mean.rst
r9372 r10388 3 3 ################ 4 4 5 .. automodule:: Orange.regression.mean 5 .. py:currentmodule:: Orange.regression.mean 6 7 .. index:: regression; mean 8 9 Accuracy of a regressor is often compared with the accuracy achieved 10 by always predicting the averag value. The "learning algorithm" 11 computes the average and represents it with a regressor of type 12 :obj:`Orange.classification.ConstantClassifier`. 13 14 .. rubric:: Examples 15 16 The following example compares the mean squared error of always 17 predicting the average with the error of a tree learner. 18 19 :download:`meanregression.py <code/meanregression.py>`: 20 21 .. literalinclude:: code/meanregression.py 22 :lines: 7
Note: See TracChangeset
for help on using the changeset viewer.