def cosineDistance(x, y):

    denom = math.sqrt(sum(x**2)*sum(y**2))
    dist = 1.0-(np.dot(x, y.conj().transpose()))/denom
    return round(dist, 6)
This function computes the cosine distance between feature vectors 
dataset/ETHPy150Open bt3gl/Advanced-Machine-Learning/k-NN/calculate_cosine_distance.py/cosineDistance