2016-02-23 15:37:22,382 : INFO : PLOT: cluster result, start multi-dimensional scaling
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 540, in runfile
execfile(filename, namespace)
File "D:/Machine-Learning/papers/DensityPeakCluster-master/step2_cluster.py", line 19, in <module>
plot('./data/data_in_paper/example_distances.dat', 20, 0.1)
File "D:/Machine-Learning/papers/DensityPeakCluster-master/step2_cluster.py", line 16, in plot
plot_cluster(dpcluster)
File "plot.py", line 44, in plot_cluster
dp_mds = mds.fit_transform(dp)
File "C:\Python27\lib\site-packages\sklearn\manifold\mds.py", line 395, in fit_transform
eps=self.eps, random_state=self.random_state)
File "C:\Python27\lib\site-packages\sklearn\manifold\mds.py", line 242, in smacof
eps=eps, random_state=random_state)
File "C:\Python27\lib\site-packages\sklearn\manifold\mds.py", line 73, in _smacof_single
raise ValueError("similarities must be symmetric")
ValueError: similarities must be symmetric
Run your code,I get this result, I use python 2.7.6.
I find this in mds.py file
if X.shape[0] == X.shape[1] and self.dissimilarity != "precomputed":
warnings.warn("The MDS API has changed. ``fit`` now constructs an"
"dissimilarity matrix from data. To use a custom "
"dissimilarity matrix, set "
"``dissimilarity=precomputed``.")
mds = manifold.MDS(max_iter=200, eps=1e-4, n_init=1,dissimilarity="precomputed")
#mds = manifold.MDS(max_iter=200, eps=1e-4, n_init=1)
this program can run. But I don't know whether correct !