How to reduce dimensionality of a rectangular matrix
Show older comments
I have collected 288 radar data. The sampling frequency was 128khz. So we collected 5-second data, which gives us 640000 data points in 5 seconds. Now we form a matrix of 640000x288 and want to reduce the dimensionality to 6400x288. Which method is suitable? I tried to use PCA using svd method. But as principal component depends upon the lowest number between the row and column of the matrix. So maximum principal component I get is 288. but I want 6400. how to get that. I tried this, but not working:
clear all;
% Load data
data = load('Activity_1.mat');
X = data.A;
X = real(X);
% Perform PCA along columns
[coeff, score, ~, ~, explained] = pca(X', 'Algorithm', 'svd');
% Choose number of top principal components to keep
k = 6400;
% Compute reduced data matrix
X_reduced = score(:, 1:k) * coeff(:, 1:k)';
% Save reduced data to file
dlmwrite('reduced_data.csv', X_reduced, 'delimiter', ',', 'precision', '%.8f');
Accepted Answer
More Answers (0)
Categories
Find more on Dimensionality Reduction and Feature Extraction in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!