Skip to content
Prev 68139 / 398502 Next

results from sammon()

On Wed, 2005-04-20 at 12:35 +0200, Domenico Cozzetto wrote:
Domenico,

I had a look at your dissimilarity matrix, and indeed, they gave all NaN
in sammon() of MASS. This is speculation: sammon() uses cmdscale to get
starting configuration, and cmdscale puts two points (20 and 21) at zero
distance from each other. Sammon scaling checks against zero
dissimilarities in input, put it seems that it doesn't check against
zero dissimilarities in starting configuration. Moving one point
slightly seems to solve your problem. In the following, diss is the
dissimilarity matrix you sent. The trick is to calculate the same
starting configuration that sammon() would use (y), but then move one of
the conflicting points slightly and give that as the starting
configuration:
[1] 0.000000 1.443101
Initial stress        : 0.23260
stress after  10 iters: 0.09420, magic = 0.461
stress after  20 iters: 0.08072, magic = 0.500
stress after  30 iters: 0.07838, magic = 0.500
stress after  40 iters: 0.07754, magic = 0.500
stress after  50 iters: 0.07710, magic = 0.500
stress after  60 iters: 0.07681, magic = 0.500
stress after  70 iters: 0.07663, magic = 0.500
stress after  80 iters: 0.07653, magic = 0.500

cheers, jari oksanen