Why is the first factor in Kernel Principal Component Analysis a very big number?

1 view (last 30 days)
Hi everyone,
I am using KPCA with the function provided by Ambarish Jash (https://uk.mathworks.com/matlabcentral/fileexchange/27319-kernel-pca). The first component extracted from the matrix is significantly different than the others. Hence, when I try to regress the component with a simple ols I get a message regarding the singularity of the matrix. A sample code could be some thing like:
x = randn(555,10);
[Kcomponents]=kernelpca(x',10);
Kcomponents= Kcomponents';
y=randn(555,1);
y= y(2:end);
KCOM= Kcomponents(1:end-1,1:2);
T=size(y,1);
results_K=ols(y,[ones(T,1) KCOM]);
However, if I reduce the dimensions of x from 555x10 to 100x10, I do not get the same message. Does anyone know why this happens? I would appreciate any help. Thanks in advance

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!