summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rwxr-xr-xdata/combined/graphs/plots.py9
-rwxr-xr-xdata/pair-matching/roc.py4
2 files changed, 10 insertions, 3 deletions
diff --git a/data/combined/graphs/plots.py b/data/combined/graphs/plots.py
index 31e9638..fb2628c 100755
--- a/data/combined/graphs/plots.py
+++ b/data/combined/graphs/plots.py
@@ -16,7 +16,7 @@ mpl.rcParams['axes.linewidth'] = 0.5
mpl.rcParams['figure.subplot.hspace'] = 0.4
mpl.rcParams['figure.subplot.wspace'] = 0.4
legend_width = 0.2
-#mpl.rcParams.update(params)
+
out_dir = sys.argv[1]
#limbs distribution
@@ -64,6 +64,7 @@ plt.ylabel("Precision [%]")
leg =plt.legend(loc="best")
leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
+plt.gca().set_aspect(2)
plt.savefig(os.path.join(out_dir,"offline-nb.pdf"),bbox_inches="tight",pad_inches=0.05)
#10-fold, SHT
@@ -76,6 +77,7 @@ plt.ylabel("Precision [%]")
leg = plt.legend(loc="lower left")
leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
+plt.gca().set_aspect(2)
plt.savefig(os.path.join(out_dir,"offline-sht.pdf"),bbox_inches="tight",pad_inches=0.05)
#online,NB
@@ -88,6 +90,7 @@ plt.ylabel("Precision [%]")
leg = plt.legend(loc="best")
leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
+plt.gca().set_aspect(2)
plt.savefig(os.path.join(out_dir,"online-nb.pdf"),bbox_inches="tight",pad_inches=0.05)
#online,SHT
@@ -100,6 +103,7 @@ plt.ylabel("Precision [%]")
leg = plt.legend(loc="best")
leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
+plt.gca().set_aspect(2)
plt.savefig(os.path.join(out_dir,"online-sht.pdf"),bbox_inches="tight",pad_inches=0.05)
#face
@@ -113,6 +117,7 @@ plt.ylabel("Precision [%]")
leg = plt.legend(loc="best")
leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
+plt.gca().set_aspect(2)
plt.savefig(os.path.join(out_dir,"face.pdf"),bbox_inches="tight",pad_inches=0.05)
#back
@@ -128,6 +133,7 @@ plt.ylabel("Precision [%]")
leg = plt.legend(loc="best")
leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
+plt.gca().set_aspect(2)
plt.savefig(os.path.join(out_dir,"back.pdf"),bbox_inches="tight",pad_inches=0.05)
#variance-reduction
@@ -141,4 +147,5 @@ plt.ylabel("Precision [%]")
leg = plt.legend(loc="best")
leg.get_frame().set_linewidth(legend_width)
plt.axis([0,100,50,100])
+plt.gca().set_aspect(2)
plt.savefig(os.path.join(out_dir,"var.pdf"),bbox_inches="tight",pad_inches=0.05)
diff --git a/data/pair-matching/roc.py b/data/pair-matching/roc.py
index 7396ab4..c0d7d83 100755
--- a/data/pair-matching/roc.py
+++ b/data/pair-matching/roc.py
@@ -51,7 +51,7 @@ if __name__ == "__main__":
indices = [i for i in range(ap.shape[0]) if ap[i,1]<0.1]
ap_false = ap[:,1][indices]
ap_true = ap[:,0][indices]
- plt.plot(ap_false,ap_true,label="Face recognition")
+ plt.plot(100*ap_false,100*ap_true,label="Face recognition")
plt.xlabel("False positive rate [%]")
plt.ylabel("True positive rate [%]")
np.random.seed()
@@ -77,7 +77,7 @@ if __name__ == "__main__":
false_pos = false_pos[indices]
true_pos = np.array(true_pos)
true_pos = true_pos[indices]
- plt.plot(false_pos,true_pos,label="$\sigma$ = "+str(s))
+ plt.plot(100*false_pos,100*true_pos,label="$\sigma$ = "+str(s))
leg = plt.legend(loc="lower right")
leg.get_frame().set_linewidth(legend_width)
plt.savefig("roc.pdf",bbox_inches="tight",pad_inches=0.05)