Truncated SVD returns unexpected 1*1 result
6 ビュー (過去 30 日間)
古いコメントを表示
Christopher McCausland
2022 年 1 月 28 日
コメント済み: Christopher McCausland
2022 年 1 月 30 日
Hi,
I am currently prefoming SVD on six channels varying in time of the same type of biometric data. The recorded channels are similar as therefore they feature high correlation.
I want to take these six channels and reduce them to a single channel using SVD, I take my data, rescale it and then preform the svd, so far so good. Where I run into problems is the reconstruction. If I want the orignal data X = U*S*V '.Instead I am trying to preform a truncation by only taking the first PC as this accounts for over 95% of the information anyways.
Instead of PC1 returning a vector (1 channel * given number of samples) I am returned a single value (1*1). I am assuming I have a matrix the wrong way around but I can't see how I am getting this result (Though I know that I am the likely problem). I will attach some open source data too.
data = rescale(data(1:6,:),0,1); % Rescale the data for reobustness between patients
[U,S,V] = svd(data(:,:),'econ'); % Preform SVD
PC1 = V(:,1)'*data(1,:)'; % Atempt to eqivilent single channel
I also know I can compute something similar with the code below, but I would just really like to know where I am going wrong now!
[coeff,score,latent] = pca(data');
new_matrix_for_classification = score(:,1);
Thank you,
Christopher
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Eigenvalues についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!