aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xevaluate.py (renamed from part2.py)142
-rw-r--r--lib/kmean.py46
-rw-r--r--lib/rerank.py (renamed from rerank.py)5
-rw-r--r--part1/data.csv (renamed from data.csv)0
-rw-r--r--part1/report/.gitignore (renamed from report/.gitignore)0
-rw-r--r--part1/report/.travis.yml (renamed from report/.travis.yml)0
-rw-r--r--part1/report/LICENSE (renamed from report/LICENSE)0
-rw-r--r--part1/report/README.md (renamed from report/README.md)0
-rwxr-xr-xpart1/report/bibliography.bib (renamed from report/bibliography.bib)0
-rw-r--r--part1/report/bibliography.csl (renamed from report/bibliography.csl)0
-rwxr-xr-xpart1/report/fig/2dscatter10classespca.pdf (renamed from report/fig/2dscatter10classespca.pdf)bin8156 -> 8156 bytes
-rwxr-xr-xpart1/report/fig/FL.JPG (renamed from report/fig/FL.JPG)bin53819 -> 53819 bytes
-rwxr-xr-xpart1/report/fig/FO.JPG (renamed from report/fig/FO.JPG)bin53026 -> 53026 bytes
-rwxr-xr-xpart1/report/fig/FR.JPG (renamed from report/fig/FR.JPG)bin55638 -> 55638 bytes
-rwxr-xr-xpart1/report/fig/SL.JPG (renamed from report/fig/SL.JPG)bin53762 -> 53762 bytes
-rwxr-xr-xpart1/report/fig/SO.JPG (renamed from report/fig/SO.JPG)bin53688 -> 53688 bytes
-rwxr-xr-xpart1/report/fig/SR.JPG (renamed from report/fig/SR.JPG)bin53002 -> 53002 bytes
-rwxr-xr-xpart1/report/fig/SubspaceQ1.pdf (renamed from report/fig/SubspaceQ1.pdf)bin107153 -> 107153 bytes
-rwxr-xr-xpart1/report/fig/SubspaceQL1.pdf (renamed from report/fig/SubspaceQL1.pdf)bin107113 -> 107113 bytes
-rwxr-xr-xpart1/report/fig/accuracy.pdf (renamed from report/fig/accuracy.pdf)bin14621 -> 14621 bytes
-rwxr-xr-xpart1/report/fig/altcm.pdf (renamed from report/fig/altcm.pdf)bin11688 -> 11688 bytes
-rwxr-xr-xpart1/report/fig/alternative_accuracy.pdf (renamed from report/fig/alternative_accuracy.pdf)bin14388 -> 14388 bytes
-rwxr-xr-xpart1/report/fig/bagging.pdf (renamed from report/fig/bagging.pdf)bin15360 -> 15360 bytes
-rwxr-xr-xpart1/report/fig/cmldapca.pdf (renamed from report/fig/cmldapca.pdf)bin11561 -> 11561 bytes
-rwxr-xr-xpart1/report/fig/eigenvalues.pdf (renamed from report/fig/eigenvalues.pdf)bin9984 -> 9984 bytes
-rwxr-xr-xpart1/report/fig/ensemble-cm.pdf (renamed from report/fig/ensemble-cm.pdf)bin12995 -> 12995 bytes
-rwxr-xr-xpart1/report/fig/face10rec.pdf (renamed from report/fig/face10rec.pdf)bin27403 -> 27403 bytes
-rwxr-xr-xpart1/report/fig/face160rec.pdf (renamed from report/fig/face160rec.pdf)bin25892 -> 25892 bytes
-rwxr-xr-xpart1/report/fig/face2.pdf (renamed from report/fig/face2.pdf)bin12868 -> 12868 bytes
-rwxr-xr-xpart1/report/fig/face5.pdf (renamed from report/fig/face5.pdf)bin13383 -> 13383 bytes
-rwxr-xr-xpart1/report/fig/face6.pdf (renamed from report/fig/face6.pdf)bin12798 -> 12798 bytes
-rwxr-xr-xpart1/report/fig/failure_2_5.pdf (renamed from report/fig/failure_2_5.pdf)bin17313 -> 17313 bytes
-rwxr-xr-xpart1/report/fig/failure_6_7.pdf (renamed from report/fig/failure_6_7.pdf)bin18204 -> 18204 bytes
-rwxr-xr-xpart1/report/fig/kneighbors_diffk.pdf (renamed from report/fig/kneighbors_diffk.pdf)bin17209 -> 17209 bytes
-rwxr-xr-xpart1/report/fig/ldapca3dacc.pdf (renamed from report/fig/ldapca3dacc.pdf)bin342247 -> 342247 bytes
-rwxr-xr-xpart1/report/fig/ldapcaf1.pdf (renamed from report/fig/ldapcaf1.pdf)bin12296 -> 12296 bytes
-rwxr-xr-xpart1/report/fig/ldapcaf2.pdf (renamed from report/fig/ldapcaf2.pdf)bin13363 -> 13363 bytes
-rwxr-xr-xpart1/report/fig/ldapcas1.pdf (renamed from report/fig/ldapcas1.pdf)bin12938 -> 12938 bytes
-rwxr-xr-xpart1/report/fig/ldapcas2.pdf (renamed from report/fig/ldapcas2.pdf)bin12736 -> 12736 bytes
-rwxr-xr-xpart1/report/fig/mean2.pdf (renamed from report/fig/mean2.pdf)bin11604 -> 11604 bytes
-rwxr-xr-xpart1/report/fig/mean_face.pdf (renamed from report/fig/mean_face.pdf)bin11655 -> 11655 bytes
-rwxr-xr-xpart1/report/fig/memalt.pdf (renamed from report/fig/memalt.pdf)bin28022 -> 28022 bytes
-rwxr-xr-xpart1/report/fig/memnn.pdf (renamed from report/fig/memnn.pdf)bin30606 -> 30606 bytes
-rwxr-xr-xpart1/report/fig/nunzplot1.pdf (renamed from report/fig/nunzplot1.pdf)bin202735 -> 202735 bytes
-rwxr-xr-xpart1/report/fig/partition.pdf (renamed from report/fig/partition.pdf)bin14108 -> 14108 bytes
-rwxr-xr-xpart1/report/fig/pcacm.pdf (renamed from report/fig/pcacm.pdf)bin11733 -> 11733 bytes
-rwxr-xr-xpart1/report/fig/random-ensemble.pdf (renamed from report/fig/random-ensemble.pdf)bin15037 -> 15037 bytes
-rwxr-xr-xpart1/report/fig/rec_2.pdf (renamed from report/fig/rec_2.pdf)bin13197 -> 13197 bytes
-rwxr-xr-xpart1/report/fig/rec_6.pdf (renamed from report/fig/rec_6.pdf)bin12909 -> 12909 bytes
-rwxr-xr-xpart1/report/fig/success1.pdf (renamed from report/fig/success1.pdf)bin12892 -> 12892 bytes
-rwxr-xr-xpart1/report/fig/success1t.pdf (renamed from report/fig/success1t.pdf)bin12963 -> 12963 bytes
-rwxr-xr-xpart1/report/fig/variance.pdf (renamed from report/fig/variance.pdf)bin18293 -> 18293 bytes
-rwxr-xr-xpart1/report/fig/vaskplot1.pdf (renamed from report/fig/vaskplot1.pdf)bin26304 -> 26304 bytes
-rwxr-xr-xpart1/report/fig/vaskplot2.pdf (renamed from report/fig/vaskplot2.pdf)bin26287 -> 26287 bytes
-rwxr-xr-xpart1/report/fig/vaskplot3.pdf (renamed from report/fig/vaskplot3.pdf)bin26211 -> 26211 bytes
-rwxr-xr-xpart1/report/fig/vaskplot4.pdf (renamed from report/fig/vaskplot4.pdf)bin26206 -> 26206 bytes
-rwxr-xr-xpart1/report/makefile (renamed from report/makefile)0
-rwxr-xr-xpart1/report/metadata.yaml (renamed from report/metadata.yaml)0
-rwxr-xr-xpart1/report/paper.md (renamed from report/paper.md)0
-rw-r--r--part1/report/template.latex (renamed from report/template.latex)0
-rwxr-xr-xpart1/test-random.sh (renamed from test-random.sh)0
-rwxr-xr-xpart1/train.py (renamed from train.py)0
-rwxr-xr-xtest-k.sh6
63 files changed, 98 insertions, 101 deletions
diff --git a/part2.py b/evaluate.py
index 08b27ac..c5528af 100755
--- a/part2.py
+++ b/evaluate.py
@@ -28,7 +28,11 @@ from numpy import genfromtxt
from numpy import linalg as LA
from timeit import default_timer as timer
from scipy.spatial.distance import cdist
+sys.path.append('lib')
from rerank import re_ranking
+from kmean import create_kmean_clusters
+import logging
+from logging import debug
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--train", help="Use test data instead of query", action='store_true')
@@ -44,16 +48,15 @@ parser.add_argument("-n", "--neighbors", help="Number of neighbors", type=int, d
parser.add_argument("-v", "--verbose", help="Use verbose output", action='store_true')
parser.add_argument("-s", "--showrank", help="Save ranklist pic id in a txt file", type=int, default = 0)
parser.add_argument("-2", "--graphspace", help="Graph space", action='store_true', default=0)
-parser.add_argument("-1", "--norm", help="Normalized features", action='store_true', default=0)
+parser.add_argument("-1", "--normalise", help="Normalized features", action='store_true', default=0)
parser.add_argument("-M", "--multrank", help="Run for different ranklist sizes equal to M", type=int, default=1)
parser.add_argument("-C", "--comparison", help="Set to 2 to obtain a comparison of baseline and Improved metric", type=int, default=1)
+parser.add_argument("--data", help="Data folder with features data", default='data')
args = parser.parse_args()
-
-def verbose(*text):
- if args.verbose:
- print(text)
+if args.verbose:
+ logging.basicConfig(level=logging.DEBUG)
def draw_results(test_label, pred_label):
acc_sc = accuracy_score(test_label, pred_label)
@@ -68,10 +71,10 @@ def draw_results(test_label, pred_label):
return acc_sc
def test_model(gallery_data, probe_data, gallery_label, probe_label, gallery_cam, probe_cam, showfiles_train, showfiles_test, args):
-
- verbose("probe shape:", probe_data.shape)
- verbose("gallery shape:", gallery_data.shape)
-
+
+ debug("probe shape: %s", probe_data.shape)
+ debug("gallery shape: %s", gallery_data.shape)
+
if args.rerank:
distances = re_ranking(probe_data, gallery_data,
args.reranka, args.rerankb, args.rerankl,
@@ -81,10 +84,10 @@ def test_model(gallery_data, probe_data, gallery_label, probe_label, gallery_cam
# metric = 'jaccard' is also valid
distances = cdist(probe_data, gallery_data, 'jaccard')
else:
- distances = cdist(probe_data, gallery_data, 'euclidean')
+ distances = cdist(probe_data, gallery_data, 'euclidean')
ranklist = np.argsort(distances, axis=1)
-
+
test_table = np.arange(1, args.multrank+1)
target_pred = np.zeros((args.multrank, ranklist.shape[0]))
nsize = args.neighbors
@@ -92,8 +95,8 @@ def test_model(gallery_data, probe_data, gallery_label, probe_label, gallery_cam
nsize = test_table[args.multrank-1]
nneighbors = np.zeros((ranklist.shape[0],nsize))
nnshowrank = (np.zeros((ranklist.shape[0],nsize))).astype(object)
-
-
+
+
for i in range(args.multrank):
if args.multrank!= 1:
args.neighbors = test_table[i]
@@ -109,19 +112,19 @@ def test_model(gallery_data, probe_data, gallery_label, probe_label, gallery_cam
nnshowrank[probe_idx][q] = showfiles_train[row[n]] #
q += 1
n += 1
-
+
if (args.neighbors) and (probe_label[probe_idx] in nneighbors[probe_idx]):
target_pred[i][probe_idx] = probe_label[probe_idx]
else:
target_pred[i][probe_idx] = nneighbors[probe_idx][0]
-
-
- if (args.showrank):
+
+
+ if (args.showrank):
with open("ranklist.txt", "w") as text_file:
text_file.write(np.array2string(nnshowrank[:args.showrank]))
with open("query.txt", "w") as text_file:
text_file.write(np.array2string(showfiles_test[:args.showrank]))
-
+
if args.graphspace:
# Colors for distinct individuals
cols = ['#{:06x}'.format(randint(0, 0xffffff)) for i in range(1467)]
@@ -134,14 +137,15 @@ def test_model(gallery_data, probe_data, gallery_label, probe_label, gallery_cam
return target_pred
def main():
- mat = scipy.io.loadmat('data/cuhk03_new_protocol_config_labeled.mat')
+ logging.debug("Verbose mode is on")
+ mat = scipy.io.loadmat(os.path.join(args.data,'cuhk03_new_protocol_config_labeled.mat'))
camId = mat['camId']
filelist = mat['filelist']
labels = mat['labels']
gallery_idx = mat['gallery_idx'] - 1
- query_idx = mat['query_idx'] - 1
+ query_idx = mat['query_idx'] - 1
train_idx = mat['train_idx'] - 1
- with open("data/feature_data.json", "r") as read_file:
+ with open(os.path.join(args.data,'feature_data.json'), 'r') as read_file:
feature_vectors = np.array(json.load(read_file))
if args.train:
query_idx = train_idx.reshape(train_idx.shape[0])
@@ -150,7 +154,7 @@ def main():
query_idx = query_idx.reshape(query_idx.shape[0])
gallery_idx = gallery_idx.reshape(gallery_idx.shape[0])
camId = camId.reshape(camId.shape[0])
-
+
showfiles_train = filelist[gallery_idx]
showfiles_test = filelist[query_idx]
train_data = feature_vectors[gallery_idx]
@@ -159,98 +163,38 @@ def main():
test_label = labels[query_idx]
train_cam = camId[gallery_idx]
test_cam = camId[query_idx]
-
+
accuracy = np.zeros((2, args.multrank))
test_table = np.arange(1, args.multrank+1)
- if (args.norm):
+ if (args.normalise):
+ debug("Normalising data")
train_data = np.divide(train_data,LA.norm(train_data, axis=0))
test_data = np.divide(test_data, LA.norm(test_data, axis=0))
if(args.kmean):
- gallery1 = []
- gallery2 = []
- gallery1lab = []
- gallery2lab = []
- for i in range(gallery_idx.size):
- if camId[gallery_idx[i]] == 1:
- gallery1.append(feature_vectors[gallery_idx[i]])
- gallery1lab.append(labels[gallery_idx[i]])
- else:
- gallery2.append(feature_vectors[gallery_idx[i]])
- gallery2lab.append(labels[gallery_idx[i]])
-
- train1 = np.array(gallery1)
- train2 = np.array(gallery2)
- tlabel1 = np.array(gallery1lab)
- tlabel2 = np.array(gallery2lab)
+ debug("Using Kmeans")
+ train_data, train_label, train_cam = create_kmean_clusters(feature_vectors,
+ labels,
+ gallery_idx,
+ camId)
+ for q in range(args.comparison):
+ target_pred = test_model(train_data, test_data, train_label, test_label, train_cam, test_cam, showfiles_train, showfiles_test, args)
+ for i in range(args.multrank):
+ accuracy[q][i] = draw_results(test_label, target_pred[i])
+ args.rerank = True
+ args.neighbors = 1
- km_train_data_1 = KMeans(n_clusters=int(np.max(labels)),random_state=0).fit(train1)
- km_train_data_2 = KMeans(n_clusters=int(np.max(labels)),random_state=0).fit(train2)
-
- ###REMAP LABELS
- km_labels_1 = np.zeros(int(np.max(labels))) # clusters size
- km_labels_2 = np.zeros(int(np.max(labels)))
- km_idx_1 = km_train_data_1.labels_
- for i in range(np.max(labels)):
- class_vote = np.zeros(np.max(labels))
- for q in range(km_idx_1.size):
- if km_idx_1[q]==i:
- class_vote[int(tlabel1[q])-1] += 1
- km_labels_1[i] = np.argmax(class_vote) + 1
-
- km_idx_2 = km_train_data_2.labels_
- for i in range(np.max(labels)):
- class_vote = np.zeros(np.max(labels))
- for q in range(km_idx_2.size):
- if km_idx_2[q]==i:
- class_vote[int(tlabel2[q])-1] += 1
- km_labels_2[i] = np.argmax(class_vote) + 1
-
- #MERGE CLUSTERS
- cl = []
- cllab = []
- clcam = []
- clustercam1 = np.ones(km_labels_1.size)
- clustercam2 = np.add(np.ones(km_labels_2.size), 1)
- for i in range(km_labels_1.size):
- cl.append(km_train_data_1.cluster_centers_[i])
- cllab.append(km_labels_1[i])
- clcam.append(clustercam1[i])
- for i in range(km_labels_2.size):
- cl.append(km_train_data_2.cluster_centers_[i])
- cllab.append(km_labels_2[i])
- clcam.append(clustercam2[i])
-
- cluster = np.array(cl)
- clusterlabel = np.array(cllab)
- clustercam = np.array(clcam)
-
- for q in range(args.comparison):
- target_pred = test_model(cluster, test_data, clusterlabel, test_label, clustercam, test_cam, showfiles_train, showfiles_test, args)
- for i in range(args.multrank):
- accuracy[q][i] = draw_results(test_label, target_pred[i])
- args.rerank = True
- args.neighbors = 1
-
- else:
- for q in range(args.comparison):
- target_pred = test_model(train_data, test_data, train_label, test_label, train_cam, test_cam, showfiles_train, showfiles_test, args)
- for i in range(args.multrank):
- accuracy[q][i] = draw_results(test_label, target_pred[i])
- args.rerank = True
- args.neighbors = 1
-
if(args.multrank != 1):
plt.plot(test_table[:(args.multrank)], 100*accuracy[0])
if(args.comparison!=1):
plt.plot(test_table[:(args.multrank)], 100*accuracy[1])
- plt.legend(['Baseline kNN', 'Improved metric'], loc='upper left')
+ plt.legend(['Baseline kNN', 'Improved metric'], loc='upper left')
plt.xlabel('k rank')
plt.ylabel('Recognition Accuracy (%)')
plt.grid(True)
plt.show()
-
+
if __name__ == "__main__":
main()
-
+
diff --git a/lib/kmean.py b/lib/kmean.py
new file mode 100644
index 0000000..f041b19
--- /dev/null
+++ b/lib/kmean.py
@@ -0,0 +1,46 @@
+from logging import debug
+import numpy as np
+from sklearn.cluster import KMeans
+
+def create_kmean_clusters(feature_vectors, labels, gallery_idx, camId):
+ gallery = ([],[])
+ gallerylab = ([],[])
+ for i in range(gallery_idx.size):
+ cam = camId[gallery_idx[i]] - 1
+ gallery[cam].append(feature_vectors[gallery_idx[i]])
+ gallerylab[cam].append(labels[gallery_idx[i]])
+
+
+ train = np.array(gallery)
+ tlabel = np.array(gallerylab)
+
+ km_train_data = []
+ km_idx = []
+ km_labels = []
+
+ for i in range(2):
+ km_train_data.append(KMeans(n_clusters=int(np.max(labels)),random_state=0).fit(train[i]))
+ km_idx.append(km_train_data[i].labels_)
+ km_labels.append(range(np.max(labels)))
+ for j in range(np.max(labels)):
+ class_vote = np.zeros(np.max(labels))
+ for q in range(km_idx[i].size):
+ if km_idx[i][q]==j:
+ class_vote[int(tlabel[i][q])-1] += 1
+ km_labels[i][j] = np.argmax(class_vote) + 1
+
+ #MERGE CLUSTERS
+ cl = []
+ cllab = []
+ clustercam = []
+ for i in range(2):
+ clustercam.append(np.add(np.ones(len(km_labels[i])), i))
+ for j in range(len(km_labels[i])):
+ cl.append(km_train_data[i].cluster_centers_[j])
+ cllab.append(km_labels[i][j])
+
+ train_data = np.array(cl)
+ debug("Kmean data has shape", train_data.shape)
+ train_label = np.array(cllab)
+ train_cam = np.array([clustercam[i] for i in range(2)]).reshape(train_label.shape[0])
+ return train_data, train_label, train_cam
diff --git a/rerank.py b/lib/rerank.py
index 6b20f53..6fb5b7b 100644
--- a/rerank.py
+++ b/lib/rerank.py
@@ -1,5 +1,6 @@
from scipy.spatial.distance import cdist
import numpy as np
+from logging import debug
def re_ranking(probFea,galFea,k1,k2,lambda_value, MemorySave = False, Minibatch = 2000):
@@ -7,7 +8,7 @@ def re_ranking(probFea,galFea,k1,k2,lambda_value, MemorySave = False, Minibatch
all_num = query_num + galFea.shape[0]
feat = np.append(probFea,galFea,axis = 0)
feat = feat.astype(np.float16)
- print('computing original distance')
+ debug('computing original distance')
if MemorySave:
original_dist = np.zeros(shape = [all_num,all_num],dtype = np.float16)
i = 0
@@ -29,7 +30,7 @@ def re_ranking(probFea,galFea,k1,k2,lambda_value, MemorySave = False, Minibatch
initial_rank = np.argsort(original_dist).astype(np.int32)
- print('starting re_ranking')
+ debug('starting re_ranking')
for i in range(all_num):
# k-reciprocal neighbors
forward_k_neigh_index = initial_rank[i,:k1+1]
diff --git a/data.csv b/part1/data.csv
index 18b04a8..18b04a8 100644
--- a/data.csv
+++ b/part1/data.csv
diff --git a/report/.gitignore b/part1/report/.gitignore
index 5236e1e..5236e1e 100644
--- a/report/.gitignore
+++ b/part1/report/.gitignore
diff --git a/report/.travis.yml b/part1/report/.travis.yml
index 49d89e9..49d89e9 100644
--- a/report/.travis.yml
+++ b/part1/report/.travis.yml
diff --git a/report/LICENSE b/part1/report/LICENSE
index 6c59dbd..6c59dbd 100644
--- a/report/LICENSE
+++ b/part1/report/LICENSE
diff --git a/report/README.md b/part1/report/README.md
index 1313d40..1313d40 100644
--- a/report/README.md
+++ b/part1/report/README.md
diff --git a/report/bibliography.bib b/part1/report/bibliography.bib
index 5c58f17..5c58f17 100755
--- a/report/bibliography.bib
+++ b/part1/report/bibliography.bib
diff --git a/report/bibliography.csl b/part1/report/bibliography.csl
index 9d967b0..9d967b0 100644
--- a/report/bibliography.csl
+++ b/part1/report/bibliography.csl
diff --git a/report/fig/2dscatter10classespca.pdf b/part1/report/fig/2dscatter10classespca.pdf
index be3d024..be3d024 100755
--- a/report/fig/2dscatter10classespca.pdf
+++ b/part1/report/fig/2dscatter10classespca.pdf
Binary files differ
diff --git a/report/fig/FL.JPG b/part1/report/fig/FL.JPG
index 7fbd05d..7fbd05d 100755
--- a/report/fig/FL.JPG
+++ b/part1/report/fig/FL.JPG
Binary files differ
diff --git a/report/fig/FO.JPG b/part1/report/fig/FO.JPG
index 857068e..857068e 100755
--- a/report/fig/FO.JPG
+++ b/part1/report/fig/FO.JPG
Binary files differ
diff --git a/report/fig/FR.JPG b/part1/report/fig/FR.JPG
index c6a31ec..c6a31ec 100755
--- a/report/fig/FR.JPG
+++ b/part1/report/fig/FR.JPG
Binary files differ
diff --git a/report/fig/SL.JPG b/part1/report/fig/SL.JPG
index 7b23634..7b23634 100755
--- a/report/fig/SL.JPG
+++ b/part1/report/fig/SL.JPG
Binary files differ
diff --git a/report/fig/SO.JPG b/part1/report/fig/SO.JPG
index 82b9e9f..82b9e9f 100755
--- a/report/fig/SO.JPG
+++ b/part1/report/fig/SO.JPG
Binary files differ
diff --git a/report/fig/SR.JPG b/part1/report/fig/SR.JPG
index 81a6af7..81a6af7 100755
--- a/report/fig/SR.JPG
+++ b/part1/report/fig/SR.JPG
Binary files differ
diff --git a/report/fig/SubspaceQ1.pdf b/part1/report/fig/SubspaceQ1.pdf
index 1dc2a1d..1dc2a1d 100755
--- a/report/fig/SubspaceQ1.pdf
+++ b/part1/report/fig/SubspaceQ1.pdf
Binary files differ
diff --git a/report/fig/SubspaceQL1.pdf b/part1/report/fig/SubspaceQL1.pdf
index 967f545..967f545 100755
--- a/report/fig/SubspaceQL1.pdf
+++ b/part1/report/fig/SubspaceQL1.pdf
Binary files differ
diff --git a/report/fig/accuracy.pdf b/part1/report/fig/accuracy.pdf
index 0e6ee40..0e6ee40 100755
--- a/report/fig/accuracy.pdf
+++ b/part1/report/fig/accuracy.pdf
Binary files differ
diff --git a/report/fig/altcm.pdf b/part1/report/fig/altcm.pdf
index b4a769a..b4a769a 100755
--- a/report/fig/altcm.pdf
+++ b/part1/report/fig/altcm.pdf
Binary files differ
diff --git a/report/fig/alternative_accuracy.pdf b/part1/report/fig/alternative_accuracy.pdf
index a843cb8..a843cb8 100755
--- a/report/fig/alternative_accuracy.pdf
+++ b/part1/report/fig/alternative_accuracy.pdf
Binary files differ
diff --git a/report/fig/bagging.pdf b/part1/report/fig/bagging.pdf
index 3700851..3700851 100755
--- a/report/fig/bagging.pdf
+++ b/part1/report/fig/bagging.pdf
Binary files differ
diff --git a/report/fig/cmldapca.pdf b/part1/report/fig/cmldapca.pdf
index c9b9299..c9b9299 100755
--- a/report/fig/cmldapca.pdf
+++ b/part1/report/fig/cmldapca.pdf
Binary files differ
diff --git a/report/fig/eigenvalues.pdf b/part1/report/fig/eigenvalues.pdf
index 6679fc2..6679fc2 100755
--- a/report/fig/eigenvalues.pdf
+++ b/part1/report/fig/eigenvalues.pdf
Binary files differ
diff --git a/report/fig/ensemble-cm.pdf b/part1/report/fig/ensemble-cm.pdf
index f79b924..f79b924 100755
--- a/report/fig/ensemble-cm.pdf
+++ b/part1/report/fig/ensemble-cm.pdf
Binary files differ
diff --git a/report/fig/face10rec.pdf b/part1/report/fig/face10rec.pdf
index 824067d..824067d 100755
--- a/report/fig/face10rec.pdf
+++ b/part1/report/fig/face10rec.pdf
Binary files differ
diff --git a/report/fig/face160rec.pdf b/part1/report/fig/face160rec.pdf
index a9baf29..a9baf29 100755
--- a/report/fig/face160rec.pdf
+++ b/part1/report/fig/face160rec.pdf
Binary files differ
diff --git a/report/fig/face2.pdf b/part1/report/fig/face2.pdf
index 9df1aeb..9df1aeb 100755
--- a/report/fig/face2.pdf
+++ b/part1/report/fig/face2.pdf
Binary files differ
diff --git a/report/fig/face5.pdf b/part1/report/fig/face5.pdf
index d2e7adc..d2e7adc 100755
--- a/report/fig/face5.pdf
+++ b/part1/report/fig/face5.pdf
Binary files differ
diff --git a/report/fig/face6.pdf b/part1/report/fig/face6.pdf
index 8a81cf8..8a81cf8 100755
--- a/report/fig/face6.pdf
+++ b/part1/report/fig/face6.pdf
Binary files differ
diff --git a/report/fig/failure_2_5.pdf b/part1/report/fig/failure_2_5.pdf
index e063a5a..e063a5a 100755
--- a/report/fig/failure_2_5.pdf
+++ b/part1/report/fig/failure_2_5.pdf
Binary files differ
diff --git a/report/fig/failure_6_7.pdf b/part1/report/fig/failure_6_7.pdf
index 1848576..1848576 100755
--- a/report/fig/failure_6_7.pdf
+++ b/part1/report/fig/failure_6_7.pdf
Binary files differ
diff --git a/report/fig/kneighbors_diffk.pdf b/part1/report/fig/kneighbors_diffk.pdf
index 024cc08..024cc08 100755
--- a/report/fig/kneighbors_diffk.pdf
+++ b/part1/report/fig/kneighbors_diffk.pdf
Binary files differ
diff --git a/report/fig/ldapca3dacc.pdf b/part1/report/fig/ldapca3dacc.pdf
index c54e1b6..c54e1b6 100755
--- a/report/fig/ldapca3dacc.pdf
+++ b/part1/report/fig/ldapca3dacc.pdf
Binary files differ
diff --git a/report/fig/ldapcaf1.pdf b/part1/report/fig/ldapcaf1.pdf
index 2734b88..2734b88 100755
--- a/report/fig/ldapcaf1.pdf
+++ b/part1/report/fig/ldapcaf1.pdf
Binary files differ
diff --git a/report/fig/ldapcaf2.pdf b/part1/report/fig/ldapcaf2.pdf
index 023ff00..023ff00 100755
--- a/report/fig/ldapcaf2.pdf
+++ b/part1/report/fig/ldapcaf2.pdf
Binary files differ
diff --git a/report/fig/ldapcas1.pdf b/part1/report/fig/ldapcas1.pdf
index 5382222..5382222 100755
--- a/report/fig/ldapcas1.pdf
+++ b/part1/report/fig/ldapcas1.pdf
Binary files differ
diff --git a/report/fig/ldapcas2.pdf b/part1/report/fig/ldapcas2.pdf
index 4a97d35..4a97d35 100755
--- a/report/fig/ldapcas2.pdf
+++ b/part1/report/fig/ldapcas2.pdf
Binary files differ
diff --git a/report/fig/mean2.pdf b/part1/report/fig/mean2.pdf
index a787886..a787886 100755
--- a/report/fig/mean2.pdf
+++ b/part1/report/fig/mean2.pdf
Binary files differ
diff --git a/report/fig/mean_face.pdf b/part1/report/fig/mean_face.pdf
index 91ae1fd..91ae1fd 100755
--- a/report/fig/mean_face.pdf
+++ b/part1/report/fig/mean_face.pdf
Binary files differ
diff --git a/report/fig/memalt.pdf b/part1/report/fig/memalt.pdf
index acc9ead..acc9ead 100755
--- a/report/fig/memalt.pdf
+++ b/part1/report/fig/memalt.pdf
Binary files differ
diff --git a/report/fig/memnn.pdf b/part1/report/fig/memnn.pdf
index 9689e8f..9689e8f 100755
--- a/report/fig/memnn.pdf
+++ b/part1/report/fig/memnn.pdf
Binary files differ
diff --git a/report/fig/nunzplot1.pdf b/part1/report/fig/nunzplot1.pdf
index 25a8471..25a8471 100755
--- a/report/fig/nunzplot1.pdf
+++ b/part1/report/fig/nunzplot1.pdf
Binary files differ
diff --git a/report/fig/partition.pdf b/part1/report/fig/partition.pdf
index 8b59fc6..8b59fc6 100755
--- a/report/fig/partition.pdf
+++ b/part1/report/fig/partition.pdf
Binary files differ
diff --git a/report/fig/pcacm.pdf b/part1/report/fig/pcacm.pdf
index 7f54ed4..7f54ed4 100755
--- a/report/fig/pcacm.pdf
+++ b/part1/report/fig/pcacm.pdf
Binary files differ
diff --git a/report/fig/random-ensemble.pdf b/part1/report/fig/random-ensemble.pdf
index 6123af1..6123af1 100755
--- a/report/fig/random-ensemble.pdf
+++ b/part1/report/fig/random-ensemble.pdf
Binary files differ
diff --git a/report/fig/rec_2.pdf b/part1/report/fig/rec_2.pdf
index 03c01ac..03c01ac 100755
--- a/report/fig/rec_2.pdf
+++ b/part1/report/fig/rec_2.pdf
Binary files differ
diff --git a/report/fig/rec_6.pdf b/part1/report/fig/rec_6.pdf
index 5b1590c..5b1590c 100755
--- a/report/fig/rec_6.pdf
+++ b/part1/report/fig/rec_6.pdf
Binary files differ
diff --git a/report/fig/success1.pdf b/part1/report/fig/success1.pdf
index bb386e0..bb386e0 100755
--- a/report/fig/success1.pdf
+++ b/part1/report/fig/success1.pdf
Binary files differ
diff --git a/report/fig/success1t.pdf b/part1/report/fig/success1t.pdf
index 4fc737c..4fc737c 100755
--- a/report/fig/success1t.pdf
+++ b/part1/report/fig/success1t.pdf
Binary files differ
diff --git a/report/fig/variance.pdf b/part1/report/fig/variance.pdf
index 58d260f..58d260f 100755
--- a/report/fig/variance.pdf
+++ b/part1/report/fig/variance.pdf
Binary files differ
diff --git a/report/fig/vaskplot1.pdf b/part1/report/fig/vaskplot1.pdf
index c26c0d9..c26c0d9 100755
--- a/report/fig/vaskplot1.pdf
+++ b/part1/report/fig/vaskplot1.pdf
Binary files differ
diff --git a/report/fig/vaskplot2.pdf b/part1/report/fig/vaskplot2.pdf
index d439ee1..d439ee1 100755
--- a/report/fig/vaskplot2.pdf
+++ b/part1/report/fig/vaskplot2.pdf
Binary files differ
diff --git a/report/fig/vaskplot3.pdf b/part1/report/fig/vaskplot3.pdf
index 18cc348..18cc348 100755
--- a/report/fig/vaskplot3.pdf
+++ b/part1/report/fig/vaskplot3.pdf
Binary files differ
diff --git a/report/fig/vaskplot4.pdf b/part1/report/fig/vaskplot4.pdf
index b507236..b507236 100755
--- a/report/fig/vaskplot4.pdf
+++ b/part1/report/fig/vaskplot4.pdf
Binary files differ
diff --git a/report/makefile b/part1/report/makefile
index 4af6952..4af6952 100755
--- a/report/makefile
+++ b/part1/report/makefile
diff --git a/report/metadata.yaml b/part1/report/metadata.yaml
index 5c4dde1..5c4dde1 100755
--- a/report/metadata.yaml
+++ b/part1/report/metadata.yaml
diff --git a/report/paper.md b/part1/report/paper.md
index 99e6836..99e6836 100755
--- a/report/paper.md
+++ b/part1/report/paper.md
diff --git a/report/template.latex b/part1/report/template.latex
index 4520e03..4520e03 100644
--- a/report/template.latex
+++ b/part1/report/template.latex
diff --git a/test-random.sh b/part1/test-random.sh
index b10c555..b10c555 100755
--- a/test-random.sh
+++ b/part1/test-random.sh
diff --git a/train.py b/part1/train.py
index c5d4389..c5d4389 100755
--- a/train.py
+++ b/part1/train.py
diff --git a/test-k.sh b/test-k.sh
new file mode 100755
index 0000000..b7aa3ad
--- /dev/null
+++ b/test-k.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+for p in 3 2 30;do
+ for q in 1 2 12;do
+ ((echo "p: $p | q: $q"; ./evaluate.py -p $p -q $q -r) >> ~/pq-vals.txt) &
+ done
+done