Thanks Ameet for the confirmation. I agree, your form is familiar and
it's not the same as the current code. I'll open a pull request after
I verify that tests pass.

--
Sean Owen | Director, Data Science | London


On Sat, Jan 18, 2014 at 1:09 AM, Ameet Talwalkar
<[email protected]> wrote:
> Sean, Walrus,
>
> Great catch.  I think this is a bug in the code (see below for a comparison
> of the current vs the correct code).  Also, here's another link describing
> the derivation.
>
> -Ameet
>
> CURRENT
> newWeights = weightsOld.sub(normGradient).div(2.0 * thisIterStepSize *
> regParam + 1.0)
>
> CORRECT
> newWeights = weightsOld.mul(1.0 - 2.0 * thisIterStepSize *
> regParam).sub(normGradient)

Reply via email to