1

I have a question please, concerning isomap on R, I use vegan package with a square matrix of distance : isomap(Dist, k=2) I still have this error:

Error in isomapdist(Dist); data arre fragmented.

I did not understand what that means ?

MLavoie
  • 9,277
  • 40
  • 37
  • 54
sam Black
  • 23
  • 1
  • 10
  • 2
    When asking for help, please provide a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). There's not always one cause for a particular error message. – MrFlick Dec 08 '16 at 16:21
  • Here is the square matrix of distance on google Drive : https://drive.google.com/file/d/0BzMljqv0BFFuMndSVVIyeENDTHc/view?usp=sharing – sam Black Dec 08 '16 at 17:08
  • And here is the line code ord – sam Black Dec 08 '16 at 17:10

2 Answers2

1

Isomap will compute the distance between points using a path between points using only k-nearest neighbors - in your case, three nearest neighbors. If your data consists of disconnected components, there may not be any path between points using only k-th nearest neighbors. Depending on what you are trying to accomplish, it may be good enough to break up your data into connected clusters and run isomap on each cluster.

I hope that this helps.

G5W
  • 34,378
  • 10
  • 39
  • 71
1

Use parameter epsilon instead of k, and tune it to a good value in order to succeed.

library(vegan)
iso <- isomap(d, ndim=1, epsilon=0.3)
GZ92
  • 131
  • 1
  • 10