Changeset 10231:47dbde912004 in orange


Ignore:
Timestamp:
02/14/12 15:30:44 (2 years ago)
Author:
anzeh <anze.staric@…>
Branch:
default
rebase_source:
8b0d2fc760ecb6941303554d782e30e41dc99060
Message:

Refactored confusion matrix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/evaluation/scoring.py

    r10204 r10231  
    142142    """ 
    143143    Classification result summary 
    144  
    145     .. attribute:: TP 
    146  
    147         True Positive predictions 
    148  
    149     .. attribute:: TN 
    150  
    151         True Negative predictions 
    152  
    153     .. attribute:: FP 
    154  
    155         False Positive predictions 
    156  
    157     .. attribute:: FN 
    158  
    159         False Negative predictions 
    160     """ 
    161     def __init__(self): 
    162         self.TP = self.FN = self.FP = self.TN = 0.0 
     144    """ 
     145    #: True Positive predictions 
     146    TP = 0. 
     147    #:True Negative predictions 
     148    TN = 0. 
     149    #:False Positive predictions 
     150    FP = 0. 
     151    #: False Negative predictions 
     152    FN = 0. 
    163153 
    164154    @deprecated_keywords({"predictedPositive": "predicted_positive", 
     
    182172            else: 
    183173                self.TN += weight 
     174 
    184175 
    185176 
     
    934925    "the positive" and others are negative. The result is a list of 
    935926    tuples (aROC, standard error). 
     927 
     928    If test results consist of multiple folds, you need to split them using 
     929    :obj:`split_by_iterations` and perform this test on each fold separately. 
    936930    """ 
    937931    useweights = res.weights and not ignore_weights 
     
    14071401        Return the area under ROC curve given a set of experimental results. 
    14081402        For multivalued class problems, return the result of :obj:`by_weighted_pairs`. 
     1403        If testing consisted of multiple folds, each fold is scored and 
     1404        average score is returned. If a fold contains only instances with 
     1405        same class value, folds will be merged. 
    14091406 
    14101407        :param test_results: test results to score 
Note: See TracChangeset for help on using the changeset viewer.