def correlation(points,data,reg=0.00001):
    pr,_ = points.shape
    dr,_ = data.shape
    
    points = points - points.mean(axis=1).reshape(pr,1)
    data = data - data.mean(axis=1).reshape(dr,1)
    
    ps = 1.0/np.sqrt((points*points).sum(axis=1)+reg).reshape(pr,1)
    ds = 1.0/np.sqrt((data*data).sum(axis=1)+reg).reshape(dr,1)
 
    points = points * ps
    data = data * ds
    
    corr = np.dot(points,data.transpose())
    return corr
Compute the correlation between points and data where 
dataset/ETHPy150Open bolme/pyvision/src/pyvision/ml/knn.py/correlation