r spgm 语言_spg_lasso.m

function [x,r,g,info] = spg_lasso(A,b,tau,options )

%SPG_LASSO Solve the LASSO problem

%

% SPG_LASSO is designed to solve the LASSO problem

%

% (LASSO) minimize ||AX - B||_2 subject to ||X||_1 <= tau,

%

% where A is an M-by-N matrix, B is an M-vector, and TAU is a

% nonnegative scalar. In all cases below, A can be an explicit M-by-N

% matrix or matrix-like object for which the operations A*x and A'*y

% are defined (i.e., matrix-vector multiplication with A and its

% adjoint.)

%

% Also, A can be a function handle that points to a function with the

% signature

%

% v = A(w,mode) which returns v = A *w if mode == 1;

% v = A'*w if mode == 2.

%

% X = SPG_LASSO(A,B,TAU) solves the LASSO problem.

%

% X = SPG_LASSO(A,B,TAU,OPTIONS) specifies options that are set using

% SPGSETPARMS.

%

% [X,R,G,INFO] = SPG_LASSO(A,B,TAU,OPTIONS) additionally returns the

% residual R = B - A*X, the objective gradient G = A'*R, and an INFO

% structure. (See SPGL1 for a description of this last output argument.)

%

...

...

(完整源码请下载查看)

...

展开> <收缩

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值