资源简介
交替方向乘子法是用于求解低秩和稀疏最优化问题的有效算法,这个包提供了交替方向乘子法的matlab代码。This package solves several sparse and low-rank optimization problems by M-ADMM proposed in our work
代码片段和文件信息
%
% References:
%
% C. Lu. A Library of ADMM for Sparse and Low-rank Optimization. National University of Singapore June 2016.
% https://github.com/canyilu/LibADMM.
% C. Lu J. Feng S. Yan Z. Lin. A Unified Alternating Direction Method of Multipliers by Majorization
% Minimization. IEEE Transactions on Pattern Analysis and Machine Intelligence vol. 40 pp. 527-541 2018
%
addpath(genpath(cd))
clear
%% Examples for testing the low-rank matrix based models
% For detailed description of the sparse models please refer to the Manual.
%% generate toy data
d = 10;
na = 200;
nb = 100;
A = randn(dna);
X = randn(nanb);
B = A*X;
b = B(:1);
opts.tol = 1e-6;
opts.max_iter = 1000;
opts.rho = 1.2;
opts.mu = 1e-3;
opts.max_mu = 1e10;
opts.DEBUG = 0;
%% RPCA
n1 = 100;
n2 = 200;
r = 10;
L = rand(n1r)*rand(rn2); % low-rank part
p = 0.1;
m = p*n1*n2;
temp = rand(n1*n21);
[~I] = sort(temp);
I = I(1:m);
Omega = zeros(n1n2);
Omega(I) = 1;
E = sign(rand(n1n2)-0.5);
S = Omega.*E; % sparse part S = P_Omega(E)
Xn = L+S;
lambda = 1/sqrt(max(n1n2));
opts.loss = ‘l1‘;
opts.DEBUG = 1;
tic
[LhatShatobjerriter] = rpca(Xnlambdaopts);
toc
rel_err_L = norm(L-Lhat‘fro‘)/norm(L‘fro‘)
rel_err_S = norm(S-Shat‘fro‘)/norm(S‘fro‘)
err
iter
%% low rank matrix completion (lrmc) and regularized lrmc
n1 = 100;
n2 = 200;
r = 5;
X = rand(n1r)*rand(rn2);
p = 0.6;
omega = find(rand(n1n2)M = zeros(n1n2);
M(omega) = X(omega);
[Xhatobjerriter] = lrmc(M omega opts);
rel_err_X = norm(Xhat-X‘fro‘)/norm(X‘fro‘)
E = randn(n1n2)/100;
M = X+E;
lambda = 0.1;
[Xhatobjerriter] = lrmcR(M omega lambda opts);
%% low rank representation (lrr)
lambda = 0.001;
opts.loss = ‘l21‘;
tic
[XEobjerriter] = lrr(AAlambdaopts);
toc
obj
err
iter
%% latent LRR (latlrr)
lambda = 0.1;
opts.loss = ‘l1‘;
tic
[ZLobjerriter] = latlrr(Alambdaopts);
toc
obj
err
iter
%% low rank and sparse representation (lrsr)
lambda1 = 0.1;
lambda2 = 4;
opts.loss = ‘l21‘;
tic
[XEobjerriter] = lrsr(ABlambda1lambda2opts);
toc
obj
err
iter
%% improved graph clustering (igc)
n = 100;
r = 5;
X = rand(nr)*rand(rn);
C = rand(size(X));
lambda = 1/sqrt(n);
opts.loss = ‘l1‘;
opts.DEBUG = 1;
tic
[LSobjerriter] = igc(XClambdaopts);
toc
err
iter
%% multi-task low-rank affinity pursuit (mlap)
n1 = 100;
n2 = 200;
K = 10;
X = rand(n1n2K);
lambda = 0.1;
alpha = 0.2;
opts.loss = ‘l1‘;
tic
[ZEobjerriter] = mlap(Xlambdaalphaopts);
toc
err
iter
%% robust multi-view spectral clustering (rmsc)
n = 100;
r = 5;
m = 10;
X = rand(nnm);
lambda = 1/sqrt(n);
opts.loss = ‘l1‘;
opts.DEBUG = 1;
tic
[LSobjerriter] = rmsc(Xlambdaopts);
toc
err
iter
%% sparse spectral clustering (sparsesc)
lambda = 0.001;
n = 100;
X = rand(nn);
W = abs(X‘*X);
I = eye(n);
D = diag(sum(W1));
L = I - sqrt(inv(D
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-03-31 20:00 ADMM\
目录 0 2019-03-31 20:00 ADMM\.git\
文件 14 2019-03-31 20:00 ADMM\.gitignore
文件 301 2019-03-31 20:00 ADMM\.git\config
文件 73 2019-03-31 20:00 ADMM\.git\desc
文件 23 2019-03-31 20:00 ADMM\.git\HEAD
目录 0 2019-03-31 20:00 ADMM\.git\hooks\
文件 478 2019-03-31 20:00 ADMM\.git\hooks\applypatch-msg.sample
文件 896 2019-03-31 20:00 ADMM\.git\hooks\commit-msg.sample
文件 3327 2019-03-31 20:00 ADMM\.git\hooks\fsmonitor-watchman.sample
文件 189 2019-03-31 20:00 ADMM\.git\hooks\post-update.sample
文件 424 2019-03-31 20:00 ADMM\.git\hooks\pre-applypatch.sample
文件 1638 2019-03-31 20:00 ADMM\.git\hooks\pre-commit.sample
文件 1348 2019-03-31 20:00 ADMM\.git\hooks\pre-push.sample
文件 4898 2019-03-31 20:00 ADMM\.git\hooks\pre-reba
文件 544 2019-03-31 20:00 ADMM\.git\hooks\pre-receive.sample
文件 1492 2019-03-31 20:00 ADMM\.git\hooks\prepare-commit-msg.sample
文件 3610 2019-03-31 20:00 ADMM\.git\hooks\update.sample
文件 5775 2019-03-31 20:00 ADMM\.git\index
目录 0 2019-03-31 20:00 ADMM\.git\info\
文件 240 2019-03-31 20:00 ADMM\.git\info\exclude
目录 0 2019-03-31 20:00 ADMM\.git\logs\
文件 183 2019-03-31 20:00 ADMM\.git\logs\HEAD
目录 0 2019-03-31 20:00 ADMM\.git\logs\refs\
目录 0 2019-03-31 20:00 ADMM\.git\logs\refs\heads\
文件 183 2019-03-31 20:00 ADMM\.git\logs\refs\heads\master
目录 0 2019-03-31 20:00 ADMM\.git\logs\refs\remotes\
目录 0 2019-03-31 20:00 ADMM\.git\logs\refs\remotes\origin\
文件 183 2019-03-31 20:00 ADMM\.git\logs\refs\remotes\origin\HEAD
目录 0 2019-03-31 20:00 ADMM\.git\ob
目录 0 2019-03-31 20:00 ADMM\.git\ob
............此处省略75个文件信息
相关资源
- 优化工具箱
- 精通MATLAB最优化计算光盘内容
- 机器学习 : 实用案例解析 mobi格式
- MATLAB实现群体多目标优化算法MOALO蚁狮
- DIRECT 全局优化算法 matlab程序 附带
- SVM分类器.zip
- 基于智能优化的机器人路径规划matl
- 最优化方法及其matlab设计课件以及源
- gpops工具箱详细注释官方手册安装方法
- matlab最优化问题
- 多目标函数优化
- 差分蜂群优化算法MATLAB实现.rar
- 带操作界面GUI的字母识别-MATLAB程序
- matlab流形学习算法工具包&matlab机器学
- 基于MATLAB与Comsol联合仿真的电磁优化
- 机器学习工具包spider工具包
- 精通Matlab最优化计算源代码114682
- 1stopt1.5破解版.zip
- matlab优化工具箱教程
- MATLAB与机器学习 李三平 陈建平译 译
- MATLAB优化算法测试函数
- 多目标优化文档及代码
- 基于优化的ADRC在异步电机矢量控制系
- MATLAB多种优化算法介绍
- 最优化方法及MATLAB的实现
- 多目标优化算法
- 精通matlab最优化计算光盘(第二版)
- 机器学习Lasso回归重要论文和Matlab代码
- 节约里程法求解CVP_MATLAB.zip
- 基于MATLAB的无碳小车轨迹优化
评论
共有 条评论