inverse principal component analysis
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Dear matlab expert i have matrix(imagesVM) with(140*71012) where 140 is no of subjects and 71012 is the no of features. i used pca to reduce high dimensionality, the out put of pca is (140*139). my question how can inverse pca to the original high dimensional vector. In an other way i want to know which 139 features from 71012
where output of pca are: mappedX(140*139) mapping[mean(1*71012)&M(71012*139)and lamda(139*1)]
my code is:
imagesVM=images';
imagesVM(:, find(sum(abs(imagesVM)) == 0)) = [];
%%%%%%%%%%%%%%features reduction%%%%%%%%%%%
no_dims=139;
%%%%%%%%%%%%%%features reduction%%%%%%%%%%%
[mappedX, mapping] = pca(imagesVM, no_dims);
your help is appreciated.
0 Commenti
Risposte (1)
Ayush Aniket
il 12 Giu 2024
Hi Ali,
PCA (Principal Component Analysis) is a dimensionality reduction technique that projects high-dimensional data into a lower-dimensional space. The output of PCA is not a selection of original features but rather a set of new features (principal components) that are linear combinations of the original features. Therefore, when you reduce your data from 71012 dimensions to 139 dimensions using PCA, you're not selecting 139 features out of the 71012 but rather transforming the data into a new space represented by 139 principal components.
Although you cannot directly find which 139 features from the original 71012 were selected, you can perform an inverse transformation to approximate the original high-dimensional data using the principal components and the PCA transformation matrix. This won't give you the original data exactly (especially if you've reduced dimensions significantly), but it will be a close approximation. Given your PCA output, you can perform the inverse transformation as follows:
% Assuming mappedX, mapping.mean, and mapping.M are already defined from your PCA
approxOriginalData = (mappedX * mapping.M') + repmat(mapping.mean, size(mappedX, 1), 1);
0 Commenti
Vedere anche
Categorie
Scopri di più su Dimensionality Reduction and Feature Extraction in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!