Error with mdscale
Afficher commentaires plus anciens
I was trying to use nonclassical MDS function 'mdscale'. I have read that non classical MDS allows incomplete distance matrix to use.I have used a dissimilarity matrix (dist_mat) with few missing entries, replaced by NaN.This is in upper triangular form for five subjects as shown below.Thus 'dist_mat' has 10 distances with unknowns represented by NaN. For Ex: dist_mat=[3.9714;NaN;NaN;3.6492;NaN ; 2.8870 ; NaN ; NaN ; NaN ;NaN] I am getting error with mdscale(dist_mat,2) as- "Cannot initialize with 'cmdscale' when there are zero weights or missing data. Initialize with 'random' or provide explicit starting points" I did not understand what this means, why cmdscale here? How to assign weights and how to initialize with 'random'? Please help, Thanks
Réponses (1)
Peter Perkins
le 28 Déc 2011
>> help mdscale
mdscale Non-Metric and Metric Multidimensional Scaling.
[snip]
'Start' - Method used to choose the initial configuration of points
for Y. Choices are:
'cmdscale' - Use the classical MDS solution. This is the default.
'cmdscale' is not valid when there are zero weights.
'random' - Choose locations randomly from an appropriately
scaled P-dimensional normal distribution with
uncorrelated coordinates.
matrix - An N-by-P matrix of initial locations. In this
case, you can pass in [] for P, and mdscale infers P
from the second dimension of the matrix. You can also
supply a 3D array, implying a value for 'Replicates'
from the array's third dimension.
1 commentaire
cvp
le 30 Déc 2011
Catégories
En savoir plus sur Random Number Generation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!