SVD did not converge (while using in PCA)

I have different train data (15 different matrices) and I am supposed to reduce their dimension from n*t to n*p. (each one individually) I am using matlab 2013 built-in PCA to reduce data dimension, and I use Matlabs' default way to compute eigen vectors (SVD), but I get an error "SVD did not converge" for "just some of train data". for some train data it works well.
also, I wrote my own mfile for PCA and the same error is appeared for some cases.
I really don't know what's the problem and I need you help and comments please.
thanks

Respuestas (3)

Brian
Brian el 17 de Oct. de 2013

0 votos

I had the same problem and found that it was solved by centering the data.
E.g. pca(data, 'Centered', true, 'NumComponents', numComponents)
Brais
Brais el 15 de Oct. de 2014
Editada: Brais el 15 de Oct. de 2014

0 votos

it might work if you normalise the features you feed to the pca so that each feature have std=1 across examples (i.e., if your input matrix is M, dim(M) = numex x featdim, then std( M(:,1) ) = 1
However, the problem might still happen. You can try the following whenever you have a crash with the normal pca
"pca( x, 'Algorithm','eig' );"
this uses the "eigenvalue" routine instead of the "svd" routine. But do it just when the normal one crashes, as it is slower
khthung
khthung el 12 de Mayo de 2015
Editada: khthung el 12 de Mayo de 2015

0 votos

I faced the similar problem: svd did not converge on linux machine, but converge in windows machine. After I replaced the matlab built-in function svd with svdecon from: http://www.mathworks.com/matlabcentral/fileexchange/47132-fast-svd-and-pca The converge problem was gone.
You may try to use this file, may be it can solve your problem too.

Categorías

Preguntada:

el 19 de Ag. de 2013

Editada:

el 12 de Mayo de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by