How to apply Classical MDS for excel file data using matlab ?
1 次查看(过去 30 天)
显示 更早的评论
Dear all
i have a dataset stored in excel file, i have reading my excel file data to A matrix, then i would like to apply the following requirements:
1- when used read command its only read numeric values and discard the headers of rows and columns, how to consider that where rows are instances and columns are features in my excel data.
A = xlsread('D:\test\ts.xls')
or
[num,txt,raw] = xlsread('D:\test\ts.xls')
2- when i find normalization for my input data, output doesn't show rows and columns titles.
normc(A) or Anorm = (A - min(A))/(max(A) - min(A));
3- How do we calculate Euclidean distances among rows (instances)?
4- How do we applying MDS to my matrix and plotting instances in graph .
5- how to stored output matrix such distance matrix to an excel file .
thanks for any suggestion
the following image show portion of my data where rows are 100 and columns are 20 .
0 个评论
采纳的回答
Von Duesenberg
2017-1-7
Hi, 1) column and row names should be in your txt variable. 2) it is quite normal that when you apply some computation on numeric data it does not include the corresponding text data; but you can easily retrieve it in your txt variable. 3) use the pdist function (the default distance is Euclidean). 4) look for cmdscale in the documentation. 5) you might want to apply the squareform function to the output of pdist, and then use xlswrite. Hope this helps.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!