Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am implementing my own version of linear kernel principal component analysis for better understanding the algorithm. I faced a problem which seems to be specific for usage of kernel pca, namely I don't really know how to deal with the outcome. Using the kernel trick reduces the number of dimensions in case there are more samples than features in the data. So my solution has less dimensions than the original data as well, which makes it impossible for me to point the corresponding feature in my raw matrix. For instance, let there be the raw data matrix $X\in \mathbb{R}^{10000\times500}$, the kernel of $X$ would be $ker_X\in \mathbb{R}^{500\times500}$. My principal component vectors would be $x_{pca}\in\mathbb{R}^{500}$ either, so how could I map this in my original feature space?


EDIT: to clarify it and to be a little more specific I am going to show my steps of the algorithm:

Let there be $X \in \mathbb{R}^{m\times s}$, $m$ being the featues and $s$ being the samples of our original space.

  1. Center the data
  2. Compute kernel $ker_{X_{centered}} := X_{centered}^T \centerdot X_{centered}$
  3. Compute eigenvalues $E := eigs(ker_{X_{centered}})$
  4. $S_{olution} := ker_{X_{centered}}\centerdot E$

Now I got the original data transformed in a space with reduced dimension and orthogonal principal components. How can I get information about a specific feature in my $S_{olution}$?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

The answer ist pretty easy, but I needed a while to get to it. If I want to get a mapping to my original data matrix, the only thing I need to do is
Let $X$ be your original data matrix, Let $P$ be the result of kPCA (as I already mentioned, $X\in\mathbb{R}^{10000\times500}$ and $P\in\mathbb{R}^{500\times500}$):

$X = X\centerdot P^T$

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.