
% [w] = abs_reg_update(w,learning_rate,C) 

function [w] = abs_reg_update(w,learning_rate,C)

  w_update = learning_rate*C*sign(w);
  index = find( (w-w_update).*sign(w) < 0 );
  w = w - w_update;
  w(index) = 0;

