Skip to content

Commit

Permalink
Major revision
Browse files Browse the repository at this point in the history
Now we have the completion and alternating minimization running… Still
needs the free energy and the correct confer-term in completion
  • Loading branch information
krzakala committed Aug 13, 2015
1 parent 69699b4 commit ca40aad
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 230 deletions.
File renamed without changes.
File renamed without changes.
19 changes: 4 additions & 15 deletions LowRAMP_UV_completion.m → Functions/LowRAMP_UV_completion.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
u_var_all=zeros(m,RANK,RANK);
v_var_all=zeros(n,RANK,RANK);

A_u_new=zeros(m,RANK,RANK);
A_v_new=zeros(m,RANK,RANK);
A_u=zeros(m,RANK,RANK);%I have m of them
B_u=zeros(m,RANK);
A_v=zeros(n,RANK,RANK);%I have n of them
Expand Down Expand Up @@ -107,7 +109,6 @@

for i=1:m
thisv=repmat(S_sup(i,:)',1,RANK).*v;
thisv=v;
A_u_new(i,:,:)=thisv'*thisv/(n*Delta);
end
for i=1:n
Expand All @@ -127,8 +128,7 @@
damp=opt.damping;
end
while (pass~=1)
if (t>0)
%here should be corrected with ACTUAL matrix inversion!
if (t>0)
A_u=(1-damp)*A_u_old+damp*A_u_new;
A_v=(1-damp)*A_v_old+damp*A_v_new;
B_u=(1-damp)*B_u_old+damp*B_u_new;
Expand All @@ -137,10 +137,7 @@
A_u=A_u_new; A_v=A_v_new;
B_u=B_u_new; B_v=B_v_new;
end

u_var

u_var_old=u_var;

logutot=0;u_var=zeros(RANK,RANK);
for i=1:m
[u(i,:),u_var_all(i,:,:),logu] = Fun_u(squeeze(A_u(i,:,:)),B_u(i,:));
Expand All @@ -149,7 +146,6 @@
end
u_var=u_var/m;

v_var_old=v_var;
logvtot=0;
for i=1:n
[v(i,:),v_var_all(i,:,:),logv] = Fun_v(squeeze(A_v(i,:,:)),B_v(i,:));
Expand All @@ -175,13 +171,6 @@
end
end

v=0.5*v+0.5*v_old;
u=0.5*u+0.5*u_old;
v_var=0.5*v_var+v_var_old;
u_var=0.5*u_var+u_var_old;



diff=mean2(abs(v-v_old))+mean2(abs(u-u_old));

if ((t==0)||(mod(t,opt.verbose_n)==0))
Expand Down
File renamed without changes.
214 changes: 0 additions & 214 deletions LowRAMP_UV_altern.m~

This file was deleted.

3 changes: 2 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Files included in this package :
run_LowRAMP_XX.m : a Demo file
subroutines folder : all subroutines needed by the different parts of the algorithm.

USAGE : from matlab, run the demo run_LowRAMP_UV and run_LowRAMP_XX
USAGE : from matlab, includes the two subfolders Functions and Subroutines (for instance using path(path,'./Functions');
path(path,'./Subroutines'); path(path,'./Functions');). Then run the demo demo_LowRAMP_UV, demo_PCA_and_completion or demo_LowRAMP_XX

These equations are based on http://arxiv.org/abs/1503.00338 (ISIT 2015) and http://arxiv.org/abs/1507.03857
Comments and remarks regarding bugs or functionalities are more than welcome.
2 changes: 2 additions & 0 deletions run_LowRAMP_UV.m → demo_LowRAMP_UV.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
path(path,'./Subroutines');
path(path,'./Functions');
%
n=2000;m=500;%size of the vector U and V
Delta=1e-2;%Variance of the gaussian noise
RANK=3;%rank
Expand Down
2 changes: 2 additions & 0 deletions run_LowRAMP_XX.m → demo_LowRAMP_XX.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
path(path,'./Subroutines');
path(path,'./Functions');
%
n=2500;%size of the vector X
RANK=3;%rank
p=0.5;
Expand Down
2 changes: 2 additions & 0 deletions run_PCA.m → demo_PCA_and_completion.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
path(path,'./Subroutines');
path(path,'./Functions');
%
m=1000;n=1000;%size of the vector U and V
Delta=1e-4;%Variance of the gaussian noise
RANK=3;%rank
Expand Down

0 comments on commit ca40aad

Please sign in to comment.