Author: Not specified Language: python
Description: Not specified Timestamp: 2018-06-11 02:59:45 +0000
View raw paste Reply
  1. projected_dist_matrix = np.zeros(shape=(J,J))
  2. for i in range(J):
  3.     for j in range(J):
  4.         dist = np.linalg.norm(projected_u[:,i]-projected_u[:,j])**2
  5.         projected_dist_matrix[i][j] =  dist  
  6.  
  7. dist_matrix = np.zeros(shape=(J,J))
  8. for i in range(J):
  9.     for j in range(J):
  10.         dist = np.linalg.norm(u[:,i]-u[:,j])**2
  11.         dist_matrix[i][j] =  dist
  12.  
  13. print(dist_matrix)
  14. print(projected_dist_matrix)
View raw paste Reply