Error with mdscale
Show older comments
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
Answers (1)
Peter Perkins
on 28 Dec 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.
Categories
Find more on Dimensionality Reduction and Feature Extraction in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!