加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
PerformanceEvaluation.py 842 Bytes
一键复制 编辑 原始数据 按行查看 历史
Akshata Patel 提交于 2018-11-15 23:34 . Add files via upload
# coding: utf-8
import cv2
import numpy as np
import glob
import math
from scipy.spatial import distance
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA
import matplotlib.pyplot as plt
import pandas as pd
from sklearn import metrics
def PerformanceEvaluation(match_L1,match_L2,match_cosine):
#storing only those elements that are correctly matched
correct_L1 = [l for l in match_L1 if l==1]
correct_L2 = [l for l in match_L2 if l==1]
correct_cosine = [l for l in match_cosine if l==1]
#calculating the correct recognition rates for L1,L2 and cosine similarity
crr_L1=len(correct_L1)/len(match_L1)
crr_L2=len(correct_L2)/len(match_L2)
crr_cosine=len(correct_cosine)/len(match_cosine)
return crr_L1*100,crr_L2*100,crr_cosine*100 #return CRR percentages
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化