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

Réponses (3)

Brian
Brian le 17 Oct 2013

0 votes

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 le 15 Oct 2014
Modifié(e) : Brais le 15 Oct 2014

0 votes

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 le 12 Mai 2015
Modifié(e) : khthung le 12 Mai 2015

0 votes

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.

Catégories

Question posée :

le 19 Août 2013

Modifié(e) :

le 12 Mai 2015

Community Treasure Hunt

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

Start Hunting!

Translated by