Changeset 9335:e785f03deb26 in orange
 Timestamp:
 12/12/11 21:19:30 (2 years ago)
 Branch:
 default
 Convert:
 69942b8b85c509bbcc6214a86fdeda0900d7073d
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

orange/doc/ofbrst/code/accuracy8.py
r6866 r9335 21 21 classIndex=data.domain.classVar.values.index('democrat')) 22 22 23 stat = (('CA', 'CA(res)'),24 ('Sens', 'sens(cm)'),25 ('Spec', 'spec(cm)'),26 ('AUC', 'AUC(res)'),27 ('IS', 'IS(res)'),28 ('Brier', 'BrierScore(res)'),29 ('F1', 'F1(cm)'),30 ('F2', 'Falpha(cm, alpha=2.0)'),31 ('MCC', 'MCC(cm)'),32 ('sPi', 'scottsPi(cm)'),23 stat = (('CA', lambda res,cm: orngStat.CA(res)), 24 ('Sens', lambda res,cm: orngStat.sens(cm)), 25 ('Spec', lambda res,cm: orngStat.spec(cm)), 26 ('AUC', lambda res,cm: orngStat.AUC(res)), 27 ('IS', lambda res,cm: orngStat.IS(res)), 28 ('Brier', lambda res,cm: orngStat.BrierScore(res)), 29 ('F1', lambda res,cm: orngStat.F1(cm)), 30 ('F2', lambda res,cm: orngStat.Falpha(cm, alpha=2.0)), 31 ('MCC', lambda res,cm: orngStat.MCC(cm)), 32 ('sPi', lambda res,cm: orngStat.scottsPi(cm)), 33 33 ) 34 34 35 scores = [ eval("orngStat."+s[1]) for s in stat]35 scores = [s[1](res,cm) for s in stat] 36 36 print 37 37 print "Learner " + "".join(["%7s" % s[0] for s in stat])
Note: See TracChangeset
for help on using the changeset viewer.