def getRank1(self,mask=None):
        rows,_ = self.matrix.shape
        
        queries = np.array([ name for name,_ in self.queries ])
        targets = np.array([ name for name,_ in self.targets ])

        success = 0.0
        count = 0.0
        for i in range(rows):
            row = self.matrix[i]
            if self.is_distance:
                j = row.argmin()
            else:
                j = row.argmax()
            if queries[i] == targets[j]:
                success += 1
            count += 1
        
        #print success, count, success/count
        return success/count
dataset/ETHPy150Open bolme/pyvision/src/pyvision/analysis/bee.py/BEEDistanceMatrix.getRank1/original