I have an $m\times n$ matrix $X$. To apply a Kernel PCA to my $X$ matrix I need to warp it into a function $K = \Phi(X)$.
The problem here is that $K$ get the size $m \times m$. If I'm doing projection with PCA.
% Average
mu = mean(K);
% Center data
Y = K - mu;
% PCA analysis
abort = input(sprintf('The size of the matrix is %ix%i. Do you want to apply PCA onto it? 1 = Yes, 0 = No: ', size(Y)));
if(abort == 1)
[U, ~, ~] = svd(Y);
else
error('Aborted');
end
% Projection
W = U(:, 1:c);
P = W'*Y;
Then the projected matrix $P$ is going to have the size $c \times m$.
Question:
I want the size of the projected matrix to have size $c \times n$. My goal is to turn $X$ into a lower dimension $c$ but keep the remaining columns $n$.
Am I using kernel PCA wrong?