资源简介
第一范数最小化解决稀疏表示问题,利用此程序即可获得表示结果
代码片段和文件信息
function [xstatushistory] = l1_ls(Avarargin)
%
% l1-Regularized Least Squares Problem Solver
%
% l1_ls solves problems of the following form:
%
% minimize ||A*x-y||^2 + lambda*sum|x_i|
%
% where A and y are problem data and x is variable (described below).
%
% CALLING SEQUENCES
% [xstatushistory] = l1_ls(Aylambda [tar_gap[quiet]])
% [xstatushistory] = l1_ls(AAtmnylambda [tar_gap[quiet]]))
%
% if A is a matrix either sequence can be used.
% if A is an object (with overloaded operators) At m n must be
% provided.
%
% INPUT
% A : mxn matrix; input data. columns correspond to features.
%
% At : nxm matrix; transpose of A.
% m : number of examples (rows) of A
% n : number of features (column)s of A
%
% y : m vector; outcome.
% lambda : positive scalar; regularization parameter
%
% tar_gap : relative target duality gap (default: 1e-3)
% quiet : boolean; suppress printing message when true (default: false)
%
% (advanced arguments)
% eta : scalar; parameter for PCG termination (default: 1e-3)
% pcgmaxi : scalar; number of maximum PCG iterations (default: 5000)
%
% OUTPUT
% x : n vector; classifier
% status : string; ‘Solved‘ or ‘Failed‘
%
% history : matrix of history data. columns represent (truncated) Newton
% iterations; rows represent the following:
% - 1st row) gap
% - 2nd row) primal objective
% - 3rd row) dual objective
% - 4th row) step size
% - 5th row) pcg iterations
% - 6th row) pcg status flag
% - 7th row) CPU time (added by Mario Figueiredo on 16/06/2007)
%
% USAGE EXAMPLES
% [xstatus] = l1_ls(Aylambda);
% [xstatus] = l1_ls(AAtmnylambda0.001);
%
% AUTHOR Kwangmoo Koh
% UPDATE Mar 4 2007
%
% COPYRIGHT 2007 Kwangmoo Koh Seung-Jean Kim and Stephen Boyd
%------------------------------------------------------------
% INITIALIZE
%------------------------------------------------------------
% IPM PARAMETERS
MU = 2; % updating parameter of t
MAX_NT_ITER = 400; % maximum IPM (Newton) iteration
% LINE SEARCH PARAMETERS
ALPHA = 0.01; % minimum fraction of decrease in the objective
BETA = 0.5; % stepsize decrease factor
MAX_LS_ITER = 100; % maximum backtracking line search iteration
% VARIABLE ARGUMENT HANDLING
% if the second argument is a matrix or an operator the calling sequence is
% l1_ls(AAtylambdamn [tar_gap[quiet]]))
% if the second argument is a vector the calling sequence is
% l1_ls(Aylambda [tar_gap[quiet]])
if ( (isobject(varargin{1}) || ~isvector(varargin{1})) && nargin >= 6)
At = varargin{1};
m = varargin{2};
n = varargin{3};
y = varargin{4};
lambda = varargin{5};
varargin = varargin(6:end);
elseif (nargin >= 3)
At = A‘;
[mn] = size(A);
y = vara
- 上一篇:自适应预测神经网络matlab程序
- 下一篇:matlab 量子隧穿效应的可视化编程
相关资源
- GPS L1C/A伪码产生
- 压缩感知Matlab-代码与文档-l1magic-1.1
- L1范数最小化matlab源代码
- l1-svd稀疏重构算法
- 压缩感知代码,matlab,l1qc_logbarrier
- l1-Magic工具箱
- l1-magic工具箱代码
- l1-ls 范数求解matlab程序包
- ESPRIT DOA算法的稀疏表示求解(L1 SRA
- paralell_model1 400Hz
- An-adaptive 自适应正则化的超分辨率重
- L1OMPsnr 基于压缩感知的DOA估计
- L1_SVD 利用压缩感知实现波达方向估计
- L1 基于L1范数的多帧图像超分辨率图像
- l1_norm_compressed-sensing 两个l1准则下的噪
- SSR_DOA 稀疏表示doa估计
评论
共有 条评论