Changeset 10258:eb2f35c68a9a in orange
 Timestamp:
 02/16/12 12:54:01 (2 years ago)
 Branch:
 default
 rebase_source:
 876063aa095c1767f2b7d654c6f391545e4067ea
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

Orange/evaluation/scoring.py
r10235 r10258 1391 1391 1392 1392 class AUC(list): 1393 ByWeightedPairs = 0 1394 ByPairs = 1 1395 WeightedOneAgainstAll = 2 1396 OneAgainstAll = 3 1393 """ 1394 Compute the area under ROC curve given a set of experimental results. 1395 For multivalued class problems, return the result of :obj:`by_weighted_pairs`. 1396 If testing consisted of multiple folds, each fold is scored and 1397 average score is returned. If a fold contains only instances with 1398 same class value, folds will be merged. 1399 1400 :param test_results: test results to score 1401 :param ignore_weights: ignore instance weights when calculating score 1402 :param method: DEPRECATED, call the appropriate method directly. 1403 """ 1397 1404 1398 1405 @replace_use_weights 1399 1406 def __init__(self, test_results=None, method=0, ignore_weights=False): 1400 """ 1401 Return the area under ROC curve given a set of experimental results. 1402 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. 1406 1407 :param test_results: test results to score 1408 :param ignore_weights: ignore instance weights when calculating score 1409 :param method: DEPRECATED, call the appropriate method directly. 1410 """ 1407 1411 1408 super(AUC, self).__init__() 1412 1409 … … 1692 1689 1693 1690 #Backward compatibility 1691 AUC.ByWeightedPairs = 0 1692 AUC.ByPairs = 1 1693 AUC.WeightedOneAgainstAll = 2 1694 AUC.OneAgainstAll = 3 1695 1694 1696 @replace_use_weights 1695 1697 def AUC_binary(res, ignore_weights=False): 
docs/reference/rst/Orange.evaluation.scoring.rst
r10230 r10258 50 50 .. autofunction:: Brier_score 51 51 52 .. autosingleton:: AUC 53 .. autoclass:: AucClass 54 :members: __call__, by_weighted_pairs, by_pairs, 52 .. autoclass:: AUC 53 :members: by_weighted_pairs, by_pairs, 55 54 weighted_one_against_all, one_against_all, single_class, pair, 56 55 matrix 
docs/reference/rst/code/scoringexample.py
r10230 r10258 10 10 AUCs = Orange.evaluation.scoring.AUC(res) 11 11 12 print "%10s %5s %5s" % (" ", "AUC", "CA")12 print "%10s %5s %5s" % ("Learner", "AUC", "CA") 13 13 for l, _ in enumerate(learners): 14 14 print "%10s: %5.3f %5.3f" % (learners[l].name, AUCs[l], CAs[l])
Note: See TracChangeset
for help on using the changeset viewer.