def one_row_cosine_similarity(X, i):
    '\n    X : normalized matrix\n    i : target sample in X\n    '
    a = ((np.dot(X, X[i].T) + 1) / 2)
    a[(a < 0)] = 0
    return a
X : normalized matrix
i : target sample in X
def one_row_cosine_similarity(X, i):
    '\n    X : normalized matrix\n    i : target sample in X\n    '
    a = ((np.dot(X, X[i].T) + 1) / 2)
    a[(a < 0)] = 0
    return a