From 2fa61c47c9e93fdc4c4908dd9ee6e7885430e73b Mon Sep 17 00:00:00 2001 From: Jon Whiteaker Date: Sun, 4 Mar 2012 00:51:57 -0800 Subject: brano's comments --- data/combined/graphs/plots.py | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'data/combined/graphs/plots.py') diff --git a/data/combined/graphs/plots.py b/data/combined/graphs/plots.py index 5fd3c2c..7b3bb3e 100755 --- a/data/combined/graphs/plots.py +++ b/data/combined/graphs/plots.py @@ -20,34 +20,45 @@ l = ["3","5","10","all"] #10-fold, naive plt.cla() -ax = plt.subplot(121) +#ax = plt.subplot(121) plt.axis([0,100,50,100]) -ax.set_aspect(2) +#ax.set_aspect(2) for i in l: x,y = np.loadtxt(i+"_nb_off.mat",unpack=True) - plt.plot(100*x,100*y,label="$n=$ "+i,linewidth=0.8) + plt.plot(100*x,100*y,label="$n_p=$ "+i,linewidth=0.8) plt.xlabel("Recall [%]") plt.ylabel("Precision [%]") plt.legend(loc="best") +plt.savefig("offline-nb.pdf") #10-fold, SHT -ax = plt.subplot(122) -plt.axis([0,100,50,100]) -ax.set_aspect(2) +#ax = plt.subplot(122) +#plt.axis([0,100,50,100]) +#ax.set_aspect(2) +plt.cla() for i in l: x,y = np.loadtxt(i+"_sht_off.mat",unpack=True) - plt.plot(100*x,100*y,label="$n=$ "+i,linewidth=0.8) + plt.plot(100*x,100*y,label="$n_p=$ "+i,linewidth=0.8) plt.xlabel("Recall [%]") plt.ylabel("Precision [%]") plt.legend(loc="best") plt.axis([0,100,50,100]) -plt.savefig("10fold.pdf") +plt.savefig("offline-sht.pdf") +#online,NB +plt.cla() +for i in l: + x,y = np.loadtxt(i+"_nb_on.mat",unpack=True) + plt.plot(100*x,100*y,label="$n_p=$ "+i,linewidth=0.8,markersize=4) + plt.xlabel("Recall [%]") + plt.ylabel("Precision [%]") + plt.legend(loc="best") +plt.savefig("online-nb.pdf") #online,SHT plt.cla() for i in l: x,y = np.loadtxt(i+"_sht_on.mat",unpack=True) - plt.plot(100*x,100*y,label="$n=$ "+i,linewidth=0.8,markersize=4) + plt.plot(100*x,100*y,label="$n_p=$ "+i,linewidth=0.8,markersize=4) plt.xlabel("Recall [%]") plt.ylabel("Precision [%]") plt.legend(loc="best") @@ -69,8 +80,10 @@ plt.savefig("face.pdf") plt.cla() x,y = np.loadtxt("back_all_sht_on.mat",unpack=True) a,b = np.loadtxt("all_sht_on.mat",unpack=True) -plt.plot(100*x,100*y,linewidth=0.8,label="Away") -plt.plot(100*a,100*b,linewidth=0.8,label="Toward") +c,d = np.loadtxt("front_back_all_sht.mat",unpack=True) +plt.plot(100*a,100*b,linewidth=0.8,label="Train/test toward") +plt.plot(100*x,100*y,linewidth=0.8,label="Train/test away") +plt.plot(100*c,100*d,linewidth=0.8,label="Train toward test away") plt.xlabel("Recall [%]") plt.ylabel("Precision [%]") plt.legend(loc="best") -- cgit v1.2.3-70-g09d2