
Applied Math Applied Math Forum 
 LinkBack  Thread Tools  Display Modes 
November 11th, 2018, 07:05 AM  #1  
Newbie Joined: Jul 2018 From: Asia Posts: 9 Thanks: 1  Singular vector decomposition and Low Rank Approximation
In https://blogs.sas.com/content/iml/20...oximation.html , could anyone elaborate on the following sentence ? Why is it 48 ? Quote:
Besides, could anyone explain how the following two equations work for low rank approximation ? Code: Ak = U[ ,idx] * diag(D[idx]) * V[ ,idx]; /* rank k approximation */ Ak = (Ak  min(Ak)) / range(Ak); /* for plotting, stdize into [0,1] */ I found that the first equation implements the internal code of matlab/octave svd() function and the second equation is "just scaling the remnant back  to cover the entire scale of (grey) colors" as described by one of my friend Again, what is the mathematical relationship between singular vector decomposition (svd) and low rank approximation ? I have copied a matlab/octave function online to be used with any images for the purpose of image compression using svd() Code: function C=compressimage(k) A=imread('einstein.jpg'); B=A(:,:,1); B=im2double(B); % imshow(B); [U,S,V]=svd(B); [m,n]=size(S); n=min(m,n); % plot([1:n,diag(S),'.'); % axis([10,n+1,0,300]); % hold on C=diag(S)'; for i=k+1:n S(i,i)=0; end B=U*S*V'; imshow(B); C=C'; end  
November 11th, 2018, 09:44 AM  #2 
Senior Member Joined: Sep 2015 From: USA Posts: 2,531 Thanks: 1390 
I don't know if this problem is spam bait or not but clicking on the link took me to some shopping website.

November 11th, 2018, 04:23 PM  #3 
Newbie Joined: Jul 2018 From: Asia Posts: 9 Thanks: 1 
@romsek Sorry, that sas blog link has an advertisement website before the actual sas blog link. Instead, please use https://web.archive.org/web/20180502...oximation.html which uses the directly captured webpage from archive.org It should be safe for everyone now. 
November 11th, 2018, 04:27 PM  #4  
Newbie Joined: Jul 2018 From: Asia Posts: 9 Thanks: 1  Quote:
 
November 11th, 2018, 06:17 PM  #5 
Newbie Joined: Jul 2018 From: Asia Posts: 9 Thanks: 1 
See https://www.diffchecker.com/AEdocp5B The following simpler matlab/octave function also works well in image compression using svd() Could anyone comment about this code below ? Code: function C=compressimage2(k) A=imread('einstein.jpg'); B=A(:,:,1); B=im2double(B); % imshow(B); sigma = B' * B; [U,S,V]=svd(sigma); UR = U(:,1:k); Breduced = B *UR; Breconstructed = Breduced * UR' ; imshow(Breconstructed); end 

Tags 
approximation, decomposition, low, rank, singular, svd, vector 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
SVD  Singular value decomposition  life24  Linear Algebra  1  June 30th, 2016 08:15 AM 
Column Rank equals Row Rank  zylo  Linear Algebra  1  October 12th, 2015 06:22 AM 
orthogonal or singular  Bhuvaneshnick  Algebra  0  December 22nd, 2014 11:53 PM 
Singular Value Decomposition  SLUO  Applied Math  1  September 8th, 2013 02:08 AM 
Prove A is singular  450081592  Linear Algebra  1  November 16th, 2009 09:05 PM 