Changeset 7406:fcc4ae9b736c in orange


Ignore:
Timestamp:
02/04/11 11:21:12 (3 years ago)
Author:
matija <matija.polajnar@…>
Branch:
default
Convert:
e2c96cf41a54a855128d567809e9bbbbfed036b0
Message:

Finished documentation of rules module. This time for real.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/classification/rules.py

    r7403 r7406  
    11""" 
    22 
    3 .. index:: rule learning 
     3.. index:: rule induction 
     4 
     5.. index::  
     6   single: classification; rule induction 
    47 
    58Supervised rule induction algorithms and rule-based classification methods. 
     
    1316============================ 
    1417 
    15 .. index:: CN2 
     18.. index::  
     19   single: classification; CN2 
    1620 
    1721Several variations of well-known CN2 rule learning algorithms are implemented. 
     
    5761    
    5862.. index:: Unordered CN2 
    59     
     63 
     64.. index::  
     65   single: classification; Unordered CN2 
     66 
    6067.. autoclass:: Orange.classification.rules.CN2UnorderedLearner 
    6168   :members: 
     
    6875.. index:: CN2-SD 
    6976.. index:: Subgroup discovery 
     77 
     78.. index::  
     79   single: classification; CN2-SD 
    7080    
    7181.. autoclass:: Orange.classification.rules.CN2SDUnorderedLearner 
     
    676686    (:class:`Orange.classification.rules.CN2Learner`) is used to construct the 
    677687    classifier. 
    678          
    679     :param instance: instance to be classified. 
    680     :type instance: :class:`Orange.data.Instance` 
    681      
    682     :param result_type: :class:`Orange.classification.Classifier.GetValue` or \ 
    683           :class:`Orange.classification.Classifier.GetProbabilities` or 
    684           :class:`Orange.classification.Classifier.GetBoth` 
    685      
    686     :rtype: :class:`Orange.data.Value`,  
    687           :class:`Orange.statistics.Distribution` or a tuple with both 
    688      
    689     """ 
     688     
     689    When constructing the classifier manually, the following parameters can 
     690    be passed: 
     691     
     692    :param rules: learned rules to be used for classification (mandatory). 
     693    :type rules: :class:`Orange.classification.rules.RuleList` 
     694     
     695    :param instances: data instances that were used for learning. 
     696    :type instances: :class:`Orange.data.Table` 
     697     
     698    :param weightID: ID of the weight meta-attribute. 
     699    :type weightID: int 
     700 
     701    """ 
     702     
    690703    def __init__(self, rules=None, instances=None, weightID = 0, **argkw): 
    691704        self.rules = rules 
     
    698711 
    699712    def __call__(self, instance, result_type=Orange.classification.Classifier.GetValue): 
     713        """ 
     714        :param instance: instance to be classified. 
     715        :type instance: :class:`Orange.data.Instance` 
     716         
     717        :param result_type: :class:`Orange.classification.Classifier.GetValue` or \ 
     718              :class:`Orange.classification.Classifier.GetProbabilities` or 
     719              :class:`Orange.classification.Classifier.GetBoth` 
     720         
     721        :rtype: :class:`Orange.data.Value`,  
     722              :class:`Orange.statistics.Distribution` or a tuple with both 
     723        """ 
    700724        classifier = None 
    701725        for r in self.rules: 
     
    799823    (:class:`Orange.classification.rules.CN2UnorderedLearner`) is used to 
    800824    construct the classifier. 
    801          
    802     :param instance: instance to be classified. 
    803     :type instance: :class:`Orange.data.Instance` 
    804     :param result_type: :class:`Orange.classification.Classifier.GetValue` or \ 
    805           :class:`Orange.classification.Classifier.GetProbabilities` or 
    806           :class:`Orange.classification.Classifier.GetBoth` 
    807      
    808     :rtype: :class:`Orange.data.Value`,  
    809           :class:`Orange.statistics.Distribution` or a tuple with both 
    810      
     825     
     826    When constructing the classifier manually, the following parameters can 
     827    be passed: 
     828     
     829    :param rules: learned rules to be used for classification (mandatory). 
     830    :type rules: :class:`Orange.classification.rules.RuleList` 
     831     
     832    :param instances: data instances that were used for learning. 
     833    :type instances: :class:`Orange.data.Table` 
     834     
     835    :param weightID: ID of the weight meta-attribute. 
     836    :type weightID: int 
     837 
    811838    """ 
    812839    def __init__(self, rules = None, instances = None, weightID = 0, **argkw): 
     
    820847 
    821848    def __call__(self, instance, result_type=Orange.core.GetValue, retRules = False): 
     849        """ 
     850        :param instance: instance to be classified. 
     851        :type instance: :class:`Orange.data.Instance` 
     852         
     853        :param result_type: :class:`Orange.classification.Classifier.GetValue` or \ 
     854              :class:`Orange.classification.Classifier.GetProbabilities` or 
     855              :class:`Orange.classification.Classifier.GetBoth` 
     856         
     857        :rtype: :class:`Orange.data.Value`,  
     858              :class:`Orange.statistics.Distribution` or a tuple with both 
     859        """ 
    822860        def add(disc1, disc2, sumd): 
    823861            disc = Orange.core.DiscDistribution(disc1) 
Note: See TracChangeset for help on using the changeset viewer.