Changeset 10388:c6f2a5ae8087 in orange


Ignore:
Timestamp:
02/27/12 23:21:32 (2 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Children:
10389:8d7ba785b51c, 10394:962c24741ced
Message:

Moved documentation about regression.mean to rst and simplified it; minor fixes in classification.majority

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Orange/regression/mean.py

    r10075 r10388  
    1 """ 
    2  
    3 **** 
    4 Mean 
    5 **** 
    6  
    7 .. index:: regression; mean 
    8  
    9  
    10 Accuracy of classifiers is often compared to the "default accuracy". 
    11 For regression, that is the accuracy of a classifier which predicts for 
    12 all instances the mean value of all observed class values in the 
    13 training data. To fit into the standard schema, even this algorithm 
    14 is provided in form of the usual learner-classifier pair. 
    15 Learning is done by :obj:`MeanLearner` and the classifier it 
    16 constructs is an instance of :obj:`ConstantClassifier`. 
    17  
    18 This is the regression counterpart of the 
    19 :obj:`Orange.classification.majority.MajorityLearner`, which can be 
    20 used for classification problems. 
    21  
    22 .. rubric:: Examples 
    23  
    24 This "learning algorithm" will most often be used to establish 
    25 whether some other learning algorithm is better than "nothing". 
    26 Here'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  
    351from Orange.core import MajorityLearner as MeanLearner 
  • docs/reference/rst/Orange.classification.majority.rst

    r10368 r10388  
    88   pair: classification; majority classifier 
    99 
    10 Accuracy of classifiers is often compared to the "default accuracy", 
     10Accuracy of classifiers is often compared with the "default accuracy", 
    1111that is, the accuracy of a classifier which classifies all instances 
    1212to 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`. 
     13computing the class distribution and its modus. The model is 
     14represented as an instance of 
     15:obj:`Orange.classification.ConstantClassifier`. 
    1416 
    1517.. class:: MajorityLearner 
     
    2022     
    2123        An estimator constructor that can be used for estimation of 
    22         class probabilities. If left None, probability of each class is 
     24        class probabilities. If left ``None``, probability of each class is 
    2325        estimated as the relative frequency of instances belonging to 
    2426        this class. 
  • docs/reference/rst/Orange.regression.mean.rst

    r9372 r10388  
    33################ 
    44 
    5 .. automodule:: Orange.regression.mean 
     5.. py:currentmodule:: Orange.regression.mean 
     6 
     7.. index:: regression; mean 
     8 
     9Accuracy of a regressor is often compared with the accuracy achieved 
     10by always predicting the averag value. The "learning algorithm" 
     11computes the average and represents it with a regressor of type 
     12:obj:`Orange.classification.ConstantClassifier`. 
     13 
     14.. rubric:: Examples 
     15 
     16The following example compares the mean squared error of always 
     17predicting the average with the error of a tree learner. 
     18 
     19:download:`mean-regression.py <code/mean-regression.py>`: 
     20 
     21.. literalinclude:: code/mean-regression.py 
     22    :lines: 7- 
Note: See TracChangeset for help on using the changeset viewer.