Changeset 7740:77eb0ab3a879 in orange


Ignore:
Timestamp:
03/15/11 13:03:19 (3 years ago)
Author:
lanz <lan.zagar@…>
Branch:
default
Convert:
d508f660a36be2b5681039fc61a881ed69fdcdb8
Message:

Changed function names to lower_case_with_underscores.

Location:
orange
Files:
2 edited

Legend:

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

    r7660 r7740  
    373373 
    374374 
    375 def lookupFromBound(attribute, bound): 
     375def lookup_from_bound(attribute, bound): 
    376376    if not len(bound): 
    377377        raise TypeError, "no bound attributes" 
     
    384384 
    385385     
    386 def lookupFromFunction(attribute, bound, function): 
     386def lookup_from_function(attribute, bound, function): 
    387387    """Constructs ClassifierByExampleTable or ClassifierByLookupTable 
    388388    mirroring the given function 
    389389     
    390390    """ 
    391     lookup = lookupFromBound(attribute, bound) 
     391    lookup = lookup_from_bound(attribute, bound) 
    392392    if lookup: 
    393393        lookup.lookupTable = [Orange.data.Value(attribute, function(attributes)) 
     
    404404       
    405405 
    406 def lookupFromData(examples, weight = 0, learnerForUnknown = None): 
     406def lookup_from_data(examples, weight = 0, learnerForUnknown = None): 
    407407    if len(examples.domain.attributes) <= 3: 
    408         lookup = lookupFromBound(examples.domain.classVar, 
     408        lookup = lookup_from_bound(examples.domain.classVar, 
    409409                                 examples.domain.attributes) 
    410410        lookupTable = lookup.lookupTable 
     
    428428         
    429429         
    430 def printLookupFunction(func): 
     430def dump_lookup_function(func): 
    431431    if isinstance(func, Orange.data.variable.Variable): 
    432432        if not func.getValueFrom: 
  • orange/fixes/fix_changed_names.py

    r7738 r7740  
    205205           "orange.ClassifierByExampleTable":"Orange.classification.lookup.ClassifierByDataTable", 
    206206 
    207            "orngLookup.lookupFromBound":"Orange.classification.lookup.lookupFromBound", 
    208            "orngLookup.lookupFromExamples":"Orange.classification.lookup.lookupFromData", 
    209            "orngLookup.lookupFromFunction":"Orange.classification.lookup.lookupFromFunction", 
    210            "orngLookup.printLookupFunction":"Orange.classification.lookup.printLookupFunction", 
     207           "orngLookup.lookupFromBound":"Orange.classification.lookup.lookup_from_bound", 
     208           "orngLookup.lookupFromExamples":"Orange.classification.lookup.lookup_from_data", 
     209           "orngLookup.lookupFromFunction":"Orange.classification.lookup.lookup_from_function", 
     210           "orngLookup.printLookupFunction":"Orange.classification.lookup.dump_lookup_function", 
    211211            
    212212           "orange.AssociationRule" : "Orange.associate.AssociationRule", 
Note: See TracChangeset for help on using the changeset viewer.