Changeset 7617:dfe49efb139a in orange


Ignore:
Timestamp:
02/07/11 11:40:11 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
84c4521f0a78b99910b2af2728129ce124a7cdf5
Message:
  • fixed the mapping for orngBayes.printModel
Location:
orange
Files:
2 edited

Legend:

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

    r7569 r7617  
    360360                print ("%20s" % i.variable.values[v][:20]) + (frmtStr % tuple(i[v])) 
    361361            print 
     362             
     363 
     364printModel = NaiveClassifier.printModel 
  • orange/fixes/fix_changed_names.py

    r7605 r7617  
    115115           "orngBayes.BayesLearner":"Orange.classification.bayes.NaiveLearner", 
    116116           "orngBayes.BayesClassifier":"Orange.classification.bayes.NaiveClassifier", 
     117           "orngBayes.printModel": "Orange.classification.bayes.printModel", 
    117118            
    118119           "orngNetwork.MdsTypeClass":"Orange.network.MdsTypeClass", 
     
    384385           } 
    385386 
    386 def build_pattern(mapping=MAPPING): 
    387     def split_dots(name): 
    388         return " '.' ".join(["'%s'" % n for n in name.split(".")]) 
    389          
    390     names = "(" + "|".join("%s" % split_dots(key) for key in mapping.keys()) + ")" 
    391      
    392     yield "power< bare_with_attr = (%s) trailer< any*> any*>"% names 
     387#def build_pattern(mapping=MAPPING): 
     388#    def split_dots(name): 
     389#        return " '.' ".join(["'%s'" % n for n in name.split(".")]) 
     390#         
     391#    names = "(" + "|".join("%s" % split_dots(key) for key in mapping.keys()) + ")" 
     392#     
     393#    yield "power< bare_with_attr = (%s) trailer< any*> any*>"% names 
    393394     
    394395def build_pattern(mapping=MAPPING): 
     
    407408     
    408409    def compile_pattern(self): 
    409         # We override this, so MAPPING can be pragmatically altered and the 
    410         # changes will be reflected in PATTERN. 
    411410        self.PATTERN = build_pattern(self.mapping) 
    412411        self._modules_to_change = [key.split(".", 1)[0] for key in self.mapping.keys()] 
     
    414413         
    415414    def package_tree(self, package): 
    416         """ Return pytree tree for asscesing the package 
     415        """ Return pytree tree for accessing the package 
    417416         
    418417        Example: 
Note: See TracChangeset for help on using the changeset viewer.