simple question on SVD

96 Views Asked by At

I have an algorithm that outputs a vector 'v' for every iteration. With ever iteration the change in vector v will get smaller and smaller.

therefore my psuedo code should be

if vold-v < 0.001 end iteration

what is the right way to compare two vectors for this purpose? I believe i have to use SVD but can someone please give a tiny background on SVD and how i should implement it?

1

There are 1 best solutions below

0
On

The mathematical thought is to use $$ \lVert v_{now} - v_{old} \rVert \lt \epsilon $$

Now you must choose a norm. If your language is Fortran, the command norm(v) uses the Euclidean norm.

Next, choose a threshold. In Fortran, the command epsilon will provide the $\epsilon$ factor for the indicated real precision.