Changeset 10935:f0b6d551bcc5 in orange


Ignore:
Timestamp:
06/20/12 22:19:07 (22 months ago)
Author:
markotoplak
Branch:
default
rebase_source:
9692cae7b56526b8b03f9bfb7c15aebc8ce11cee
Message:

Fixed AUC_for_single_class to return just the probabilities if
called with just one split iteration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/evaluation/scoring.py

    r10914 r10935  
    15681568 
    15691569        if test_results is not None: 
    1570             self[:] = self.__call__(test_results) 
     1570            r = self.__call__(test_results) 
     1571            if r == False: #when the test is invalid it can return a single False 
     1572                r = [ False ] * test_results.number_of_learners 
     1573            self[:] = r 
    15711574 
    15721575    @replace_discrete_probabilities_with_list(method=True) 
     
    16741677                (class_index, res, res.number_of_iterations)) 
    16751678        else: 
    1676             return self._compute_one_class_against_all(res, class_index) 
     1679            return self._compute_one_class_against_all(res, class_index)[0] 
    16771680 
    16781681    # Computes AUC for a pair of classes (as if there were no other classes) 
Note: See TracChangeset for help on using the changeset viewer.