Ignore:
Timestamp:
02/07/12 12:25:07 (2 years ago)
Author:
Lan Zagar <lan.zagar@…>
Branch:
default
rebase_source:
f0ad78c447c1eb5a31a85078a3bf36fab4dcb7c9
Message:

Changed the order of type checking for results in testing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/evaluation/testing.py

    r9697 r9914  
    3838        """Appends a new result (class and probability prediction by a single classifier) to the classes and probabilities field.""" 
    3939     
    40         if type(aclass)==list: 
    41             self.classes.append(aclass) 
    42             self.probabilities.append(aprob) 
     40        if type(aclass)==int: 
     41            self.classes.append(int(aclass)) 
     42            self.probabilities.append(list(aprob)) 
    4343        elif type(aclass.value)==float: 
    4444            self.classes.append(float(aclass)) 
    4545            self.probabilities.append(aprob) 
    4646        else: 
    47             self.classes.append(int(aclass)) 
    48             self.probabilities.append(list(aprob)) 
     47            self.classes.append(aclass) 
     48            self.probabilities.append(aprob) 
    4949 
    5050    def set_result(self, i, aclass, aprob): 
Note: See TracChangeset for help on using the changeset viewer.