diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2012-03-02 16:28:09 -0800 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2012-03-02 16:28:09 -0800 |
| commit | a9c5394e154db4bcaecc105959a3d785b0d3cc92 (patch) | |
| tree | 097d540a782186d5bbc39e1687fc20add4bbd699 /data/combined/graphs | |
| parent | 9651c1a32e740927e65cdc31e3bfba06343f7989 (diff) | |
| download | kinect-a9c5394e154db4bcaecc105959a3d785b0d3cc92.tar.gz | |
Add face recognition plot and plot generating code
Diffstat (limited to 'data/combined/graphs')
| -rwxr-xr-x | data/combined/graphs/plots.py | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/data/combined/graphs/plots.py b/data/combined/graphs/plots.py new file mode 100755 index 0000000..4b32f92 --- /dev/null +++ b/data/combined/graphs/plots.py @@ -0,0 +1,60 @@ +#! /usr/bin/python + +import numpy as np +import matplotlib.pyplot as plt + +l = ["3","5","10","all"] + +#10-fold, naive +plt.cla() +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.xlabel("Recall [%]") + plt.ylabel("Precision [%]") + plt.legend(loc="best") + plt.savefig("10fold-naive.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.xlabel("Recall [%]") + plt.ylabel("Precision [%]") + plt.legend(loc="best") + plt.savefig("online-sht.pdf") + + +#face +plt.cla() +x,y = np.loadtxt("all_nb_off.mat",unpack=True) +a,b = np.loadtxt("face.csv",delimiter=",", unpack=True) +plt.plot(100*x,100*y,linewidth=0.8,label="Skeleton") +plt.plot(100*a,100*b,linewidth=0.8,label="Face") +plt.xlabel("Recall [%]") +plt.ylabel("Precision [%]") +plt.legend(loc="best") +plt.savefig("face.pdf") + +#back +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") +plt.xlabel("Recall [%]") +plt.ylabel("Precision [%]") +plt.legend(loc="best") +plt.savefig("back.pdf") + +#variance-reduction +plt.cla() +x,y = np.loadtxt("half-var-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="Reduced noise") +plt.plot(100*a,100*b,linewidth=0.8,label="Original noise") +plt.xlabel("Recall [%]") +plt.ylabel("Precision [%]") +plt.legend(loc="best") +plt.savefig("var.pdf") |
