I have been studying the concept of PCA and its implementation for dimensionality reduction for more than 1 month. My goal is to classify a hyperspectral image using sparse representation by the linear combination concept which is as follow:
$$y = Dx$$
So consider $D$ as a dictionary with $d\times B$ dimension where $d=3000$ is the number of samples and $B=200$ is the number of band/channel.
Now I am trying to construct the $D$ by this mean that the classes (sub-dictionaries) are well separated. Therefore I want to apply PCA to individual sub-dictionary in order to form the main dictionary.
However, my goal is to apply PCA on hyperspectral satellite imagery like this.
I have implemented the PCA in Octave and project my data on that particular low dimension. But my question is should I reduce the number of training pixels(observation=d$$) or reduce the variable dimension ($B$)?
Since I use sparse representation and dictionary concept then reducing the dimension of $d$ (observation pixels for individual classes) is more make sense rather than reducing the number of features ($B$). But I am not sure if I am right or not.
After constructing the $D$ should I transform $y$ to PCA dimension before computing its spars coefficients or not?