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

set.seed(1)
D <- as.matrix(dist(matrix(rnorm(40), 10)))
morie_spatial_voting_smacof(D)
#> $coordinates
#>             [,1]       [,2]
#>  [1,]  0.6778400  2.1098544
#>  [2,] -0.4424462  0.7057382
#>  [3,] -0.9885156 -0.6544259
#>  [4,]  0.4105252 -3.4358287
#>  [5,] -1.6030304  1.1582060
#>  [6,] -0.9757340 -0.1058779
#>  [7,] -0.0128137 -0.3989280
#>  [8,]  1.4249053 -0.7133299
#>  [9,]  1.2491278  0.3994733
#> [10,]  0.2601415  0.9351185
#> 
#> $stress
#> [1] 6.626513
#> 
#> $iterations
#> [1] 104
#> 
#> $converged
#> [1] TRUE
#>