资源简介
Sparse Subspace Clustering基于人脸分割的子空间聚类的原始代码,已验证没有错误,大家可以放下下载。
(Sparse Subspace Clustering segmentation based on face subspace clustering source code, no errors have been verified, you can put down the download.)
代码片段和文件信息
%--------------------------------------------------------------------------
% This function takes a DxN matrix of N data points in a D-dimensional
% space and returns a NxN coefficient matrix of the sparse representation
% of each data point in terms of the rest of the points
% Y: DxN data matrix
% affine: if true then enforce the affine constraint
% thr1: stopping threshold for the coefficient error ||Z-C||
% thr2: stopping threshold for the linear system error ||Y-YZ||
% maxIter: maximum number of iterations of ADMM
% C2: NxN sparse coefficient matrix
%--------------------------------------------------------------------------
% Copyright @ Ehsan Elhamifar 2012
%--------------------------------------------------------------------------
function C2 = admmLasso_mat_func(YaffinealphathrmaxIter)
if (nargin < 2)
% default subspaces are linear
affine = false;
end
if (nargin < 3)
% default regularizarion parameters
alpha = 800;
end
if (nargin < 4)
% default coefficient error threshold to stop ADMM
% default linear system error threshold to stop ADMM
thr = 2*10^-4;
end
if (nargin < 5)
% default maximum number of iterations of ADMM
maxIter = 200;
end
if (length(alpha) == 1)
alpha1 = alpha(1);
alpha2 = alpha(1);
elseif (length(alpha) == 2)
alpha1 = alpha(1);
alpha2 = alpha(2);
end
if (length(thr) == 1)
thr1 = thr(1);
thr2 = thr(1);
elseif (length(thr) == 2)
thr1 = thr(1);
thr2 = thr(2);
end
N = size(Y2);
% setting penalty parameters for the ADMM
mu1 = alpha1 * 1/computeLambda_mat(Y);
mu2 = alpha2 * 1;
if (~affine)
% initialization
A = inv(mu1*(Y‘*Y)+mu2*eye(N));
C1 = zeros(NN);
Lambda2 = zeros(NN);
err1 = 10*thr1; err2 = 10*thr2;
i = 1;
% ADMM iterations
while ( err1(i) > thr1 && i < maxIter )
% updating Z
Z = A * (mu1*(Y‘*Y)+mu2*(C1-Lambda2/mu2));
Z = Z - diag(diag(Z));
% updating C
C2 = max(0(abs(Z+Lambda2/mu2) - 1/mu2*ones(N))) .* sign(Z+Lambda2/mu2);
C2 = C2 - diag(diag(C2));
% updating Lagrange multipliers
Lambda2 = Lambda2 + mu2 * (Z - C2);
% computing errors
err1(i+1) = errorCoef(ZC2);
err2(i+1) = errorLinSys(YZ);
%
C1 = C2;
i = i + 1;
end
fprintf(‘err1: %2.4f err2: %2.4f iter: %3.0f \n‘err1(end)err2(end)i);
else
% initialization
A = inv(mu1*(Y‘*Y)+mu2*eye(N)+mu2*ones(NN));
C1 = zeros(NN);
Lambda2 = zeros(NN);
lambda3 = zeros(1N);
err1 = 10*thr1; err2 = 10*thr2; err3 = 10*thr1;
i = 1;
% ADMM iterations
while ( (err1(i) > thr1 || err3(i) > thr1) && i < maxIter )
% updating Z
Z = A * (mu1*(Y‘*Y)+mu2*(C1-Lambda2/mu2)+mu2*ones(N1)*(ones(1N)-lambda3/mu2));
Z = Z - diag(diag(Z));
% updating C
C2 = max(0(abs(Z+Lambda2/mu2) - 1/mu2*ones(N))) .* sign(Z+Lambda2/mu2);
C2 = C2 - diag(diag(C2));
% updating Lagrange multi
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-08-31 18:51 SSC_ADMM_v1.1\
文件 6148 2012-10-03 01:46 SSC_ADMM_v1.1\.DS_Store
文件 969 2012-10-02 01:49 SSC_ADMM_v1.1\BuildAdjacency.m
文件 733 2012-10-04 23:58 SSC_ADMM_v1.1\DataProjection.m
文件 747 2012-10-02 01:43 SSC_ADMM_v1.1\Misclassification.m
文件 1189 2012-10-04 23:59 SSC_ADMM_v1.1\SSC.m
文件 255 2018-08-31 18:52 SSC_ADMM_v1.1\SSC_Faces.mat
文件 1218 2012-10-02 01:40 SSC_ADMM_v1.1\SpectralClustering.m
文件 8018017 2012-06-29 16:19 SSC_ADMM_v1.1\YaleBCrop025.mat
文件 3427 2012-10-05 00:01 SSC_ADMM_v1.1\admmLasso_mat_func.m
文件 3980 2012-10-05 00:03 SSC_ADMM_v1.1\admmOutlier_mat_func.m
文件 678 2012-10-02 01:43 SSC_ADMM_v1.1\computeLambda_mat.m
文件 548 2012-10-02 01:43 SSC_ADMM_v1.1\errorCoef.m
文件 825 2012-10-02 01:43 SSC_ADMM_v1.1\errorLinSys.m
文件 580 2012-10-03 12:30 SSC_ADMM_v1.1\matrixNormalize.m
文件 1099 2012-10-02 01:41 SSC_ADMM_v1.1\missclassGroups.m
文件 17712 2012-10-05 00:26 SSC_ADMM_v1.1\readme.pdf
文件 1558 2012-10-05 00:25 SSC_ADMM_v1.1\readme.rtf
文件 1362 2012-10-05 00:08 SSC_ADMM_v1.1\run_SSC_Faces.m
文件 2863 2012-10-05 00:28 SSC_ADMM_v1.1\run_SSC_MS.m
文件 680 2012-10-03 01:04 SSC_ADMM_v1.1\thrC.m
- 上一篇:12369环保举报自动受理系统
- 下一篇:5000个ICO图标文件
相关资源
- TLE5012B基于STM32F103 SPI接口的驱动程序
- FACTS modelling and control
- SSClone完全版
- NamelessCotrunQuad_V1.0-master.zip
- 基于Qt QGraphicsScene的画图演示
- SSC最新源码.rar
- 如何使用CiteSpace进行中文的文献分析
-
CrossCore em
bedded StudioCCES破解方法,工 - ResScope-v1.94破解版
- 2017年(最新)SSCI检索期刊目录
- 全天SSC计划预测WAP手机版.rar
- 春彩SSC源码带后台和开奖.zip
- WordPressCMS主题:知更鸟begin5.2授权破解
- 最新SSC喜虎完整源码.zip
- ISSCC2019论文集[百度网盘链接及压缩包
- Scala Machine Learning ProjectsScala机器学习
- 31302_ResScan_6.0.1.zip
- 真人+CP整站ylc系统源码.zip
- sscom4.2串口调试助手
- SSCOM4.2串口调试工具
- 串口调试工具sscom5.11
- DevExpressCrack-master.zip
- 串口网络调试助手sscom5.1.3.rar
- DSScan1.0(135溢出漏洞扫描工具)
- 命令提示符完全透明GlassCMD.rar
- sscom42串口调试
- masscan win版本
- 在QGraphicsScene上画矩形
- ISSCC 2019 论文/PPT/Demo 百度网盘版链接
- sscom5.13.1.exe
评论
共有 条评论