View Single Post
Old 02-16-2013, 10:49 PM
yaser's Avatar
yaser yaser is offline
Join Date: Aug 2009
Location: Pasadena, California, USA
Posts: 1,478
Default Re: Question on regularization for logistic regression

Originally Posted by melipone View Post
Thanks. Okay, so if I take the derivative of \frac{\lambda}{2N}w^Tw for the regularization, I just add \frac{\lambda}{N}w to the gradient in the update of each weight in stochastic gradient descent. Is that correct?

I was also looking into L1 and L2 regularization. That would be L2 regularization above. My understanding is that L1 regulation would just add a penalty term to the gradient regardless of the weight itself. Is my understanding correct?

Indeed, you add the linear term to get the new gradient. L2 and L1 define the regularization term based on squared value and absolute value, respectively. What is added to the gradient is the derivative of that.
Where everyone thinks alike, no one thinks very much
Reply With Quote