view DL/Majorization Minimization DL/softthreshold.m @ 207:233e75809e4a luisf_dev

Accelerated the code for LGD and optimal grandient descent
author bmailhe
date Wed, 21 Mar 2012 14:12:25 +0000
parents b14209313ba4
children
line wrap: on
line source
% Soft threshold operator for matrices
% [Y] = softthreshold(X,theta)
% X : input matrix
% theta : thresholding parameter
function [Y] = softthreshold(X,theta)
Y = X - min(theta,abs(X)).*sign(X);