摘要: 1 #计算相似度 2 3 #欧式距离 4 # npvec1, npvec2 = np.array(det_a), np.array(det_b) 5 # similirity=math.sqrt(((npvec1 - npvec2) ** 2).sum()) 6 # print('similirity:',similirity) 7 8 #余弦相似度 9 # def cos... 阅读全文
posted @ 2018-08-16 16:09 谁动了我的奶盖 阅读(3524) 评论(0) 推荐(0) 编辑
摘要: 1 #曲线拟合 2 fig = plt.figure() 3 ax = fig.add_subplot(111)#将画布分割成1行1列,图像画在从左到右从上到下的第1块 4 5 ax.plot(Num,a,label=u'A',color='m',linestyle='',marker='.') 6 阅读全文
posted @ 2018-08-16 16:06 谁动了我的奶盖 阅读(1292) 评论(0) 推荐(0) 编辑
摘要: 1 #批量对文件夹下的'.mat'进行处理 2 3 def file_name(file_dir,suff): 4 L=[] 5 for root, dirs, files in os.walk(file_dir): 6 for file in files: 7 if os.path.splitext(file)[1] == suff: 8 ... 阅读全文
posted @ 2018-08-16 15:57 谁动了我的奶盖 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Result: 局部放大: 阅读全文
posted @ 2018-08-16 15:40 谁动了我的奶盖 阅读(2422) 评论(0) 推荐(0) 编辑