Changeset 7803:e7a7b9fc29a2 in orange


Ignore:
Timestamp:
04/02/11 23:13:45 (3 years ago)
Author:
matija <matija.polajnar@…>
Branch:
default
Convert:
118629cb6644e4c55ec760ae6b37554ffa5e0ff2
Message:

Orange.classification.rules: Completion (maybe?) of transition to Orange 2.5.

File:
1 edited

Legend:

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

    r7802 r7803  
    179179    :lines: 19-23 
    180180 
    181  
    182181.. py:class:: Orange.classification.rules.Rule(filter, classifier, lr, dist, ce, w = 0, qu = -1) 
    183182    
     
    230229      but, obviously, any other measure can be applied. 
    231230    
    232    .. method:: filterAndStore(instances, weight_id=0, target_class=-1) 
     231   .. method:: filter_and_store(instances, weight_id=0, target_class=-1) 
    233232    
    234233      Filter passed data instances and store them in the attribute 'examples'. 
     
    916915                                instances.domain.class_var, instances) 
    917916 
    918     def __call__(self, instance, result_type=Orange.classification.Classifier.GetValue, retRules = False): 
     917    @deprecated_keywords({"retRules": "ret_rules"}) 
     918    def __call__(self, instance, result_type=Orange.classification.Classifier.GetValue, ret_rules = False): 
    919919        """ 
    920920        :param instance: instance to be classified. 
     
    955955            retDist.normalize() 
    956956         
    957         if retRules: 
     957        if ret_rules: 
    958958            if result_type == Orange.classification.Classifier.GetValue: 
    959959              return (retDist.modus(), covRules) 
     
    25862586        self.default_class_index = -1 
    25872587 
    2588     def __call__(self, example, result_type=Orange.classification.Classifier.GetValue, retRules = False): 
     2588    @deprecated_keywords({"retRules": "ret_rules"}) 
     2589    def __call__(self, example, result_type=Orange.classification.Classifier.GetValue, ret_rules = False): 
    25892590        example = Orange.core.Example(self.examples.domain,example) 
    25902591        tempDist = Orange.core.Distribution(example.domain.class_var) 
     
    26232624            final_dist.normalize() 
    26242625                 
    2625         if retRules: # Do you want to return rules with classification? 
     2626        if ret_rules: # Do you want to return rules with classification? 
    26262627            if result_type == Orange.classification.Classifier.GetValue: 
    26272628              return (final_dist.modus(),best_rules) 
Note: See TracChangeset for help on using the changeset viewer.