Changeset 9754:060889552ecf in orange

02/06/12 16:10:03 (2 years ago)

Added new documentation: Orange.classification.random and Orange.preprocess.RemoveUnusedValues.

6 added
2 edited


  • Orange/preprocess/

    r9671 r9754  
    2626.. autoclass:: Preprocessor_preprocessorList 
     28.. class:: RemoveUnusedValues(variable, data, remove_one_valued=False) 
     30    Often the definition of a discrete attribute declares values that 
     31    do not actually appear in the data, either originally or as a 
     32    consequence of some preprocessing. Such anomalies are taken 
     33    care of by class RemoveUnusedValues that, given an attribute and the 
     34    data, determines whether there are any unused values and reduces the 
     35    attribute if needed. 
     37    :param variable: :class:`` 
     38    :param data: :class:`` 
     39    :param remove_one_valued: Decides whether to remove or to retain 
     40        the attributes with only one value defined (default: False). 
     42    Example: 
     44    .. literalinclude:: code/     
     46    There are four possible outcomes: 
     48    1. The variable does not have any used values in the data - value 
     49    of this variable is undefined for all examples. The variable is 
     50    thus useless and the class returns None. 
     52    2. The variable has only one used value (or, possibly, only one 
     53    value at all). Such a variable is in fact useless, and can 
     54    probably be removed without harm. Nevertheless, its fate is 
     55    decided by the flag remove_one_valued which is False by default, 
     56    so such variables are retained unless explicitly specified 
     57    otherwise. 
     59    3. All variable's values occur in the data (and the variable has more 
     60    than one value; otherwise the above case applies). The original variable 
     61    is returned. 
     63    4. There are some unused values. A new variable is constructed and the 
     64    unused values are omitted. The value of the new variable is computed 
     65    automatically from the value of the original variable  
     66    :class:`Orange.classification.lookup.ClassifierByLookupTable` is used 
     67    for mapping. 
     69    Results of example: 
     71    .. literalinclude:: code/unusedValues.res 
     73    Variables a and y are OK and are left alone. In b, value 1 is not used 
     74    and is removed (not in the original variable, of course; a new variable 
     75    is created). c is useless and is removed altogether. d is retained since 
     76    remove_one_valued was left at False; if we set it to True, this variable 
     77    would be removed as well. 
  • docs/reference/rst/Orange.classification.rst

    r9735 r9754  
    100100   Orange.classification.svm 
    101101   Orange.classification.tree 
     102   Orange.classification.random    
Note: See TracChangeset for help on using the changeset viewer.