Dimensionality reduction on matrices with missing entries

Hi guys,
I wanted to do dimensionality reduction on many matrices so that they all have the same dimensions.
So, I have matrices of the dimensions: 50x220, 50x190, 50x300, 50x235, 50x149, etc. At the end I want to reduce second dimension to 10 so I would have matrices 50x10, 50x10, 50x10, 50x10 and so on for each of them. The problem is that in my case I have matrices with missing values and I use the general pca function for raw data.
So I have matrices something like that:
X(1).matrix = [1 2 3 ...
3 4 5 ...
3 4 4 ...
6 NaN 7 ...
...........
NaN NaN NaN]
X(2).matrix = [3 4 5 ...
5 6 7 ...
4 4 4 ...
NaN 3 3 ...
NaN 4 4 ...
...........
NaN NaN 7]
X(3).matrix = [3 3 3
2 1 3
...........
NaN 1 2]
After applying function pca I just get some coeff. But I dont know how to actually get to the dimensionality reduction (i.e. matrices having dimensions 50x10 dimensions). Thanks in advance for your time and help!

回答(1 个)

[coeff,score,latent] = pca(mymatrix)
here latent gives you variance of the principal components in decreasing order. You can pick the first n (10) number of columns.

1 个评论

Thanks for the answer!
So, I pick the first 10 columns of score matrix right?
Or do I pick the first 10 rows of the score matrix?

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息

提问:

2019-5-24

编辑:

2019-5-24

Community Treasure Hunt

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

Start Hunting!

Translated by