Changeset 7382:712dd1d77457 in orange


Ignore:
Timestamp:
02/04/11 09:19:58 (3 years ago)
Author:
tomazc <tomaz.curk@…>
Branch:
default
Convert:
966fae91866251d69686d4a47bf24062ab4165c1
Message:

Documentatio and code refactoring at Bohinj retreat.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/feature/scoring.py

    r7374 r7382  
    8585 
    8686    .. attribute:: handlesDiscrete 
     87     
    8788    Tells whether the measure can handle discrete attributes. 
    8889 
    8990    .. attribute:: handlesContinuous 
     91     
    9092    Tells whether the measure can handle continuous attributes. 
    9193 
    9294    .. attribute:: computesThresholds 
     95     
    9396    Tells whether the measure implements the :obj:`thresholdFunction`. 
    9497 
    9598    .. attribute:: needs 
     99     
    96100    Tells what kind of data the measure needs. This can be either  
    97101    :obj:`NeedsGenerator`, :obj:`NeedsDomainContingency`,  
     
    180184 
    181185    .. method:: thresholdFunction(attribute, examples[, weightID]) 
     186     
    182187    This function computes the qualities for different binarizations of the 
    183188    continuous attribute :obj:`attribute`. The attribute should of course be 
     
    201206    "tear_rate", you could write simply:: 
    202207 
    203         >>>> print orange.MeasureAttribute_info("tear_rate", data) 
     208        >>> print orange.MeasureAttribute_info("tear_rate", data) 
    204209        0.548794984818 
    205210 
     
    259264    conditional probabilities of classes are estimated by relative frequencies. 
    260265 
    261     .. attribute:: unknownsTreatment  
     266    .. attribute:: unknownsTreatment 
     267      
    262268    Defines what to do with unknown values. See the possibilities described above. 
    263269 
    264     .. attribute:: estimatorConstructor, conditionalEstimatorConstructor 
     270    .. attribute:: estimatorConstructor 
     271    .. attribute:: conditionalEstimatorConstructor 
     272     
    265273    The classes that are used to estimate unconditional and conditional 
    266274    probabilities of classes, respectively. You can set this to, for instance,  
     
    341349    attribute, according to the specified cost matrix. 
    342350 
    343     .. attribute:: cost  
     351    .. attribute:: cost 
     352      
    344353    Cost matrix, see :obj:`Orange.classification.CostMatrix` for details. 
    345354 
     
    348357    measure can be constructed and used for attribute 3 as follows:: 
    349358 
    350     >>> meas = Orange.feature.scoring.Cost() 
    351     >>> meas.cost = ((0, 5), (1, 0)) 
    352     >>> meas(3, data) 
    353     0.083333350718021393 
     359        >>> meas = Orange.feature.scoring.Cost() 
     360        >>> meas.cost = ((0, 5), (1, 0)) 
     361        >>> meas(3, data) 
     362        0.083333350718021393 
    354363 
    355364    This tells that knowing the value of attribute 3 would decrease the 
     
    371380 
    372381    .. attribute:: k 
     382     
    373383    Number of neighbours for each example. Default is 5. 
    374384 
    375385    .. attribute:: m 
     386     
    376387    Number of reference examples. Default is 100. Set to -1 to take all the 
    377388    examples. 
    378389 
    379390    .. attribute:: checkCachedData 
     391     
    380392    A flag best left alone unless you know what you do. 
    381393 
     
    413425and the subsequent calls simply return the stored data. 
    414426 
    415 Class :obj:`Relief` works on discrete and continuous classes and thus 
     427Class :obj:`Relief` works on discrete and continuous classes and thus  
    416428implements functionality of algorithms ReliefF and RReliefF. 
    417429 
    418 .. note:: ReliefF can also compute the threshold function, that is, the  
    419 attribute quality at different thresholds for binarization. 
     430.. note:: 
     431   ReliefF can also compute the threshold function, that is, the attribute 
     432   quality at different thresholds for binarization. 
    420433 
    421434Finally, here is an example which shows what can happen if you disable the  
     
    454467 
    455468    .. attribute:: unknownsTreatment 
     469     
    456470    Tells what to do with unknown attribute values. See description on the top 
    457471    of this page. 
    458472 
    459473    .. attribute:: m 
     474     
    460475    Parameter for m-estimate of error. Default is 0 (no m-estimate). 
    461476 
Note: See TracChangeset for help on using the changeset viewer.