diff options
| author | Jon Whiteaker <jbw@berkeley.edu> | 2012-03-04 00:51:57 -0800 |
|---|---|---|
| committer | Jon Whiteaker <jbw@berkeley.edu> | 2012-03-04 00:51:57 -0800 |
| commit | 2fa61c47c9e93fdc4c4908dd9ee6e7885430e73b (patch) | |
| tree | 6b9e5227747b42e96b7d6e71b84cd965420bbc53 /data/combined/graphs/plots.py | |
| parent | 88a0dc3805499ba780d753ba6f138562a5217a26 (diff) | |
| download | kinect-2fa61c47c9e93fdc4c4908dd9ee6e7885430e73b.tar.gz | |
brano's comments
Diffstat (limited to 'data/combined/graphs/plots.py')
| -rwxr-xr-x | data/combined/graphs/plots.py | 35 |
1 files changed, 24 insertions, 11 deletions
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") |
