How to apply Classical MDS for excel file data using matlab ?

조회 수: 1 (최근 30일)
ahmed obaid
ahmed obaid 2017년 1월 7일
답변: Von Duesenberg 2017년 1월 7일
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 .

채택된 답변

Von Duesenberg
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개)

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by