Changeset 10227:d3d53e81f7e2 in orange


Ignore:
Timestamp:
02/15/12 12:01:10 (2 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Message:

Changed argument names for ConstantClassifier, cleaned documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/Orange.classification.rst

    r10203 r10227  
    4444    same class probabilities. 
    4545 
    46     Its constructor can be called without arguments, with a variable (for 
    47     :obj:`class_var`), value (for :obj:`default_val`) or both. If the value 
    48     is given and is of type :obj:`Orange.data.Value` (alternatives are an 
    49     integer index of a discrete value or a continuous value), its attribute 
    50     :obj:`Orange.data.Value.variable` will either be used for initializing 
    51     :obj:`class_var` or checked against it, if :obj:`class_var` is given 
    52     as an argument.  
     46    .. attribute:: class_var 
     47 
     48        Class variable that the classifier predicts. 
     49 
     50    .. attribute:: default_val 
     51 
     52        Value returned by the classifier. 
     53 
     54    .. attribute:: default_distribution 
     55 
     56        Class probabilities returned by the classifier. 
    5357     
    54     .. method:: __init__(class_var, default_val, default_distribution) 
     58    .. method:: __init__(variable, value, distribution) 
    5559 
    56         The constructor can be called without arguments, with a variable 
    57         (for :obj:`class_var`), value (for :obj:`default_val`) or both. 
    58         If the value is given and is of type :obj:`Orange.data.Value` 
    59         (alternatives are an integer index of a discrete value or a continuous 
    60         value), its attribute :obj:`Orange.data.Value.variable` will either 
    61         be used for initializing :obj:`class_var` or checked against it, 
    62         if :obj:`class_var` is given as an argument.  
     60        Constructor can be called without arguments, with a 
     61        variable, value or both. If the value is given and is of type 
     62        :obj:`Orange.data.Value`, its attribute 
     63        :obj:`Orange.data.Value.variable` will either be used for 
     64        initializing 
     65        :obj:`~Orange.classification.ConstantClassifier.variable` or 
     66        checked against it, if :obj:`variable` is given as an 
     67        argument. 
    6368         
    64         :param class_var: Class variable that the classifier predicts. 
    65         :param default_val: Value that is returned by the classifier. 
    66         :param default_distribution: Class probabilities returned by the classifier. 
     69        :param variable: Class variable that the classifier predicts. 
     70        :type variable: :obj:`Orange.feature.Descriptor` 
     71        :param value: Value returned by the classifier. 
     72        :type value: :obj:`Orange.data.Value` or int (index) or float 
     73        :param distribution: Class probabilities returned by the classifier. 
     74        :type dstribution: :obj:`Orange.statistics.distribution.Distribution` 
    6775        
    6876    .. method:: __call__(instances, return_type) 
     
    7280        of the given data instance. 
    7381 
    74     :obj:`ConstantClassifier` also has the following attributes, which 
    75     correspond to the constructor arguments described above. 
    7682 
    77     .. attribute:: class_var 
    78     .. attribute:: default_val 
    79     .. attribute:: default_distribution 
    8083 
    8184Writing custom Classifiers 
Note: See TracChangeset for help on using the changeset viewer.