Changeset 12:469af3a0790f in orange-reliability


Ignore:
Timestamp:
07/09/12 15:18:52 (22 months ago)
Author:
Matija Polajnar <matija.polajnar@…>
Branch:
default
Message:

Make plots nicer, along with axis reversal to make them like the ones in Pevec's paper.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _reliability/__init__.py

    r11 r12  
    10371037    return rels, acc 
    10381038 
    1039 def acc_rel_plot(method, data, learner, file_name="acc_rel_plot.png", colors=None): 
     1039 
     1040def rel_acc_plot(rels, acc, file_name=None, colors=None): 
    10401041 
    10411042    import matplotlib.pylab as plt 
    1042  
    1043     plt.clf() 
    1044  
    1045     rels, acc = get_acc_rel(method, data, learner) 
    1046     print "rels", rels 
    1047     print "acc", acc 
    1048  
     1043     
    10491044    if colors is None: 
    10501045        colors = "k" 
    1051     plt.scatter(acc, rels, c=colors) 
     1046    plt.scatter(rels, acc, c=colors) 
    10521047    plt.xlim(0.,1.) 
    10531048    plt.ylim(ymin=0.) 
    1054     plt.savefig(file_name) 
     1049    plt.xlabel("Reliability") 
     1050    plt.ylabel("Accuracy") 
     1051    if file_name is None: 
     1052        plt.show() 
     1053    else: 
     1054        plt.savefig(file_name) 
     1055 
     1056def rel_acc_compute_plot(method, data, learner, file_name=None, colors=None): 
     1057 
     1058    plt.clf() 
     1059 
     1060    rels, acc = get_acc_rel(method, data, learner) 
     1061    el_acc_plot(acc, rels, file_name=file_name, colors=colors) 
     1062     
    10551063 
    10561064def acc_rel_correlation(method, data, learner): 
Note: See TracChangeset for help on using the changeset viewer.