低秩矩阵恢复代码.doc

低秩矩阵恢复代码.doc

ID:52588857

大小:24.50 KB

页数:3页

时间:2020-03-28

低秩矩阵恢复代码.doc_第1页
低秩矩阵恢复代码.doc_第2页
低秩矩阵恢复代码.doc_第3页
资源描述:

《低秩矩阵恢复代码.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、functionx_out=MSB(Aop,y_vec,s_x,lambda1,rnk,iter)%function[x_outobj_func]=MSB(Aop,y_vec,[mn],lambda1,rnk)%Thiscodesolvestheproblemofrecoveringalowrankmatrixfromits%lowerdimensionalprojections%Minimize

2、

3、X

4、

5、*(nuclearnormofZ)%SubjecttoA(X)=Y%formulatedasanunconst

6、arinednuclearnormminmizationproblemusingSplitbregmanalgorithm%Minmimize(lambda1)

7、

8、W

9、

10、*+1/2

11、

12、A(X)-y

13、

14、_2^2+eta/2

15、

16、W-X-B1

17、

18、_2^2%WisauxillaryvariableandB1isthebregmanvariable%INPUTS%Aop:Linearoperator%y_vec:Vectorofobservedvalues%s_x:sizeofthedatamatrixtoberecover

19、ed(informof[mn])%lambda1:regularizationparameter%rnk:rankestimationforX%iter:maximumnumberofiterationstobecarriedout%OUTPUTS%x_out:recoveredmatrixifnargin<6error('InsufficientNumberofarguments');end%Variableandparameterinitializationeta1=.001;%Regularizationpa

20、rameters_new=s_x(1)*s_x(2);W=zeros(s_new,1);%proxyvariableB1=ones(s_new,1);%bregmanvariable%createoperatorforleastsquaremimimizationI=opDiag(s_new,1);Aop_concat=opStack([1eta1],Aop,I);%runiterativealgorithmforiteration=1:iter%measurementvectorforL2minimization

21、b_vec=[y_vec;eta1*(W-B1)];%L2minimizationstep(subproblem1)X=lsqr(@lsqrAop,b_vec);%NuclearnormminizationStep(subproblem2)W=X+B1;[W,s_thld]=nuc_norm(W,s_x,s_new,lambda1,eta1,rnk);%bregmanvariableupdateB1=B1+X-W;%Objectivefunctionvalueobj_func(iteration)=0.5*norm

22、(y_vec-Aop(X,1))+lambda1*sum(s_thld);ifiteration>10&&abs(obj_func(iteration)-obj_func(iteration-10))<1e-7breakendend%reshapingrecoveredvectortomatrixformx_out=reshape(X,s_x(1),s_x(2));%Plotobjectivefunctionplot(obj_func);title('ConvergenceofObjectiveFunction')

23、xlabel('Numberofiterations');ylabel('Objectivefunctionvalue');functiony=lsqrAop(x,transpose)switchtransposecase'transp'y=Aop_concat(x,2);case'notransp'y=Aop_concat(x,1);endendend

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。