def selfSimilarityMatrix(featureVectors):
 [nDims, nVectors] = featureVectors.shape
 [featureVectors2, MEAN, STD] = aT.normalizeFeatures([featureVectors.T])
 featureVectors2 = featureVectors2[0].T
 S = (1.0 - distance.squareform(distance.pdist(featureVectors2.T, 'cosine')))
 return S

def selfSimilarityMatrix ( featureVectors ) : [ nDims , nVectors ] = featureVectors . shape [ featureVectors2 , MEAN , STD ] = aT . normalizeFeatures ( [ featureVectors . T ] ) featureVectors2 = featureVectors2 [ 0 ] . T S = ( 1.0 - distance . squareform ( distance . pdist ( featureVectors2 . T , 'cosine' ) ) ) return S
this function computes the self-similarity matrix for a sequence of feature vectors .