Skip to content

Commit

Permalink
Minor cleaning updates
Browse files Browse the repository at this point in the history
  • Loading branch information
krzakala committed Aug 16, 2015
1 parent 0818748 commit 9af0dba
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 220 deletions.
19 changes: 6 additions & 13 deletions Functions/LowRAMP_UV.m
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@

u_old=zeros(m,RANK);
v_old=zeros(n,RANK);
u_var=zeros(RANK,RANK);u_var_old=zeros(RANK,RANK);
v_var=zeros(RANK,RANK);v_var_old=zeros(RANK,RANK);

u_var=zeros(RANK,RANK);
v_var=zeros(RANK,RANK);
A_u=zeros(RANK,RANK);
B_u=zeros(m,RANK);
A_v=zeros(RANK,RANK);
Expand All @@ -125,19 +125,12 @@
B_u_new=(S*v)/sqrt(n)-u_old*v_var/(Delta);
A_u_new=v'*v/(n*Delta);

% m_mean=sum(sum(triu(A_u_new,1)))/((RANK*RANK-RANK)*0.5);
% A_u_new=diag(diag(A_u_new))+triu(ones(RANK,RANK),1)*m_mean+triu(ones(RANK,RANK),1)'*m_mean;


B_v_new=(S'*u)/sqrt(n)-v_old*(m*u_var/n)/(Delta);
A_v_new=u'*u/(n*Delta);

% m_mean=sum(sum(triu(A_v_new,1)))/((RANK*RANK-RANK)*0.5);
% A_v_new=diag(diag(A_v_new))+triu(ones(RANK,RANK),1)*m_mean+triu(ones(RANK,RANK),1)'*m_mean;


%Keep old variables
u_old=u;u_var_old=u_var;
v_old=v;v_var_old=v_var;
u_old=u;
v_old=v;

%Iteration with fixed damping or learner one
pass=0;
Expand Down
201 changes: 0 additions & 201 deletions Functions/LowRAMP_UV.m~

This file was deleted.

4 changes: 0 additions & 4 deletions Functions/LowRAMP_XX.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@
B_new=(S*x)/sqrt(n)-x_old*x_V/(Delta);
A_new=x'*x/(n*Delta);

%Right, here i can play...
% m_mean=sum(sum(triu(A_new,1)))/((RANK*RANK-RANK)*0.5);
% A_new=diag(diag(A_new))+triu(ones(RANK,RANK),1)*m_mean+triu(ones(RANK,RANK),1)'*m_mean;

%Keep old variables
x_old=x;

Expand Down
12 changes: 11 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@ Files included in this package :
subroutines folder : all subroutines needed by the different parts of the algorithm.

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
path(path,'./Subroutines'); path(path,'./Functions');).

Then run
* demo demo_LowRAMP_UV for a UV factorization of a clustering problem
* demo_PCA_and_completion for a completion problem
* demo_LowRAMP_XX for a community detection problem
* demo_Rank1_Submatrix for a submatrix localization problem

These equations are based on http://arxiv.org/abs/1503.00338 (ISIT 2015) and http://arxiv.org/abs/1507.03857
They follow from earlier works:
http://arxiv.org/abs/1402.2238
http://arxiv.org/pdf/1202.2759.pdf
http://papers.nips.cc/paper/5074-low-rank-matrix-reconstruction-and-clustering-via-approximate-message-passing
Comments and remarks regarding bugs or functionalities are more than welcome.
2 changes: 1 addition & 1 deletion demo_Rank1_Sumatrix.m → demo_Rank1_Submatrix.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Delta=0.001;%Variance of the gaussian noise
RANK=1;%rank

fprintf(1,'Creating a %dx%d signal with a %dx%d submtrix hidden \n',m,n,m_m,n_n);
fprintf(1,'Creating a %dx%d signal with a %dx%d submatrix hidden \n',m,n,m_m,n_n);
Y=[zeros(m-m_m,n); ones(m_m,n_n) zeros(m_m,n-n_n)];

subplot(2,2,1)
Expand Down

0 comments on commit 9af0dba

Please sign in to comment.