Changeset 10141:0a7d22f1145f in orange


Ignore:
Timestamp:
02/08/12 19:04:22 (2 years ago)
Author:
ales_erjavec
Branch:
default
rebase_source:
ed1f3a83824e543ebeb53fc5a9a12633f0874e7b
Message:

resultType -> result_type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/regression/linear.py

    r9927 r10141  
    235235      
    236236        if self.intercept: 
    237              if A is None: 
    238                  X = numpy.ones([n,1]) 
    239              else: 
    240                  X = numpy.insert(A, 0, 1, axis=1) # adds a column of ones 
     237            if A is None: 
     238                X = numpy.ones([n,1]) 
     239            else: 
     240                X = numpy.insert(A, 0, 1, axis=1) # adds a column of ones 
    241241        else: 
    242              X = A 
     242            X = A 
    243243              
    244244        domain = table.domain 
     
    443443 
    444444    def __call__(self, instance, \ 
    445                  resultType=Orange.classification.Classifier.GetValue): 
     445                 result_type=Orange.classification.Classifier.GetValue): 
    446446        """ 
    447447        :param instance: data instance for which the value of the response 
     
    471471        dist = Orange.statistics.distribution.Continuous(self.class_var) 
    472472        dist[y_hat] = 1.0 
    473         if resultType == Orange.classification.Classifier.GetValue: 
     473        if result_type == Orange.classification.Classifier.GetValue: 
    474474            return y_hat 
    475         if resultType == Orange.classification.Classifier.GetProbabilities: 
     475        if result_type == Orange.classification.Classifier.GetProbabilities: 
    476476            return dist 
    477477        return (y_hat, dist) 
Note: See TracChangeset for help on using the changeset viewer.