Dimensionality reduction on matrices with missing entries
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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!
0 comentarios
Respuestas (1)
KSSV
el 24 de Mayo de 2019
Editada: KSSV
el 24 de Mayo de 2019
[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.
For more information read: http://www.cs.otago.ac.nz/cosc453/student_tutorials/principal_components.pdf
1 comentario
Ver también
Categorías
Más información sobre Dimensionality Reduction and Feature Extraction en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!