def test():
points = square_points(10)
distance = np.zeros((100,100))
for (i, pointi) in enumerate(points):
for (j, pointj) in enumerate(points):
distance[i, j] = norm(pointi - pointj)
Y, eigs = mds(distance)
pylab.figure(1)
pylab.plot(Y[:, 0], Y[:, 1], '.')
pylab.figure(2)
pylab.plot(points[:, 0], points[:, 1], '.')
pylab.show()
评论列表
文章目录