Ignore:
Timestamp:
03/02/12 16:56:57 (2 years ago)
Author:
anzeh <anze.staric@…>
Branch:
default
Message:

Fixed some backward compatibility issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/statExamples.py

    r9945 r10429  
    6868 
    6969cm = Orange.evaluation.scoring.confusion_matrices(res) 
     70sensitivities = Orange.evaluation.scoring.sens(cm) 
     71specificities = Orange.evaluation.scoring.spec(cm) 
    7072print 
    7173print "Sensitivity and specificity for 'voting'" 
    7274print "method\tsens\tspec" 
    7375for l in range(len(learners)): 
    74     print "%s\t%5.3f\t%5.3f" % (learners[l].name, Orange.evaluation.scoring.sens(cm[l]), Orange.evaluation.scoring.spec(cm[l])) 
     76    print "%s\t%5.3f\t%5.3f" % (learners[l].name, sensitivities[l], specificities[l]) 
    7577 
    7678cm = Orange.evaluation.scoring.confusion_matrices(resVeh, vehicle.domain.class_var.values.index("van")) 
     79sensitivities = Orange.evaluation.scoring.sens(cm) 
     80specificities = Orange.evaluation.scoring.spec(cm) 
    7781print 
    7882print "Sensitivity and specificity for 'vehicle=van'" 
    7983print "method\tsens\tspec" 
    8084for l in range(len(learners)): 
    81     print "%s\t%5.3f\t%5.3f" % (learners[l].name, Orange.evaluation.scoring.sens(cm[l]), Orange.evaluation.scoring.spec(cm[l])) 
     85    print "%s\t%5.3f\t%5.3f" % (learners[l].name, sensitivities[l], specificities[l]) 
    8286 
    8387print 
Note: See TracChangeset for help on using the changeset viewer.