Skip to contents

Iterative majorisation algorithm for metric MDS.

Usage

morie_spatial_voting_smacof(
  D,
  n_dims = 2L,
  max_iter = 300L,
  tol = 1e-06,
  weights = NULL,
  init = NULL
)

Arguments

D

Symmetric dissimilarity matrix.

n_dims

Number of dimensions.

max_iter

Maximum iterations.

tol

Convergence tolerance on stress change.

weights

Optional weight matrix (defaults to uniform).

init

Optional initial configuration (n x n_dims).

Value

A list with coordinates, stress, iterations, converged.

References

De Leeuw, J. (1977). "Applications of Convex Analysis to Multidimensional Scaling." In Recent Developments in Statistics, 133-145. Borg & Groenen (2005).

Examples

D <- as.matrix(dist(matrix(rnorm(40), 10)))
morie_spatial_voting_smacof(D)
#> $coordinates
#>             [,1]       [,2]
#>  [1,]  1.0011851 -0.1986848
#>  [2,]  0.4241829  1.1855714
#>  [3,]  0.5563521  0.2392309
#>  [4,]  1.2667688  1.3163947
#>  [5,] -0.9488380  1.2438371
#>  [6,] -0.5867843 -0.9393277
#>  [7,]  2.1326990 -0.6439346
#>  [8,] -1.5976099 -0.8804727
#>  [9,]  0.3828710 -1.4688848
#> [10,] -2.6308267  0.1462705
#> 
#> $stress
#> [1] 9.768171
#> 
#> $iterations
#> [1] 152
#> 
#> $converged
#> [1] TRUE
#>