Ignore:
Timestamp:
01/09/12 20:45:31 (2 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
a581caa2b289ded439ca09b23029c3001d3835d5
Message:

Added documentation about multiple classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/Orange.data.domain.rst

    r9372 r9524  
    7878 
    7979 
     80Multiple classes 
     81================ 
     82 
     83A domain can have multiple additional class attributes. These are stored 
     84similarly to other features except that they are not used for learning. The 
     85list of such classes is stored in `class_vars`. When converting between 
     86domains, multiple classes can become ordinary features or the class, and 
     87vice versa. 
     88 
    8089Meta attributes 
    8190=============== 
     
    197206and the new attribute appears as unknown. 
    198207 
     208 
     209 
    199210.. class:: Domain 
    200211 
     
    216227     :obj:`None` if there is none. Read only. 
    217228 
     229     .. attribute:: class_vars 
     230 
     231     A list of additional class attributes. Read only. 
     232 
    218233     .. attribute:: version 
    219234 
     
    222237     different domains also have different versions. 
    223238 
    224      .. method:: __init__(variables) 
     239     .. method:: __init__(variables[, class_vars=]) 
    225240 
    226241     Construct a domain with the given variables specified; the 
     
    236251 
    237252     :param variables: List of variables (instances of :obj:`Orange.data.variable.Variable`) 
     253         :param class_vars: A list of multiple classes; must be a keword argument 
    238254     :type variables: list 
    239255 
    240      .. method:: __init__(features, class_variable) 
     256     .. method:: __init__(features, class_variable[, classVars=]) 
    241257 
    242258     Construct a domain with the given list of features and the 
     
    251267     :type features: list 
    252268     :param class_variable: Class variable 
     269         :param class_vars: A list of multiple classes; must be a keword argument 
    253270     :type features: Orange.data.variable.Variable 
    254271 
    255      .. method:: __init__(variables, has_class) 
     272     .. method:: __init__(variables, has_class[, class_vars=]) 
    256273 
    257274     Construct a domain with the given variables. If has_class is 
     
    267284     :type features: list 
    268285     :param has_class: A flag telling whether the domain has a class 
    269      :type has_class: bool 
    270  
    271      .. method:: __init__(variables, source) 
     286         :param class_vars: A list of multiple classes; must be a keword argument 
     287     :type has_class: bool 
     288 
     289     .. method:: __init__(variables, source[, class_vars=]) 
    272290 
    273291     Construct a domain with the given variables, which can also be 
     
    282300     :type variables: list 
    283301     :param source: An existing domain or a list of variables 
     302         :param class_vars: A list of multiple classes; must be a keword argument 
    284303     :type source: Orange.data.Domain or list of :obj:`Orange.data.variable.Variable` 
    285304 
    286      .. method:: __init__(variables, has_class, source) 
     305     .. method:: __init__(variables, has_class, source[, class_vars=]) 
    287306 
    288307     Similar to above except for the flag which tells whether the 
     
    297316     :type has_class: bool 
    298317     :param source: An existing domain or a list of variables 
     318         :param class_vars: A list of multiple classes; must be a keword argument 
    299319     :type source: Orange.data.Domain or list of :obj:`Orange.data.variable.Variable` 
    300320 
    301      .. method:: __init__(domain, class_var) 
     321     .. method:: __init__(domain, class_var[, class_vars=]) 
    302322 
    303323     Construct a domain as a shallow copy of an existing domain 
     
    310330     :type domain: :obj:`Orange.variable.Domain` 
    311331     :param class_var: Class variable for the new domain 
     332         :param class_vars: A list of multiple classes; must be a keword argument 
    312333     :type class_var: string or :obj:`Orange.data.variable.Variable` 
    313334 
    314      .. method:: __init__(domain, has_class=False) 
     335     .. method:: __init__(domain, has_class=False[, class_vars=]) 
    315336 
    316337     Construct a shallow copy of the domain. If the ``has_class`` 
     
    321342     :type domain: :obj:`Orange.variable.Domain` 
    322343     :param has_class: A flag telling whether the domain has a class 
     344         :param class_vars: A list of multiple classes; must be a keword argument 
    323345     :type has_class: bool 
    324346 
Note: See TracChangeset for help on using the changeset viewer.