Expand|Select|Wrap|Line Numbers
- from collections import *
- from CBIR import *
- from experiment import *
- from scipy.spatial import distance
- result_list = list()
- i = 0
- a_list = list()
- b_list = list()
- a_list.append(feature_matrix_ip)
- while i < 9:
- b_list.append(feature_matrix_db[i])
- dist = distance.euclidean(a_list,b_list[i])
- result_list.append(dist)
- result_list_sort = OrderedDict(sorted(enumerate(result_list),key=lambda x: x[0])).keys()
- i = i + 1
- res_lst_srt = zip(result_list,result_list_sort)
- res_lst_srt.sort()
- print res_lst_srt
Any suggestions are welcome!
Thanks for the support!