View Single Post
Old 08-26-2012, 02:37 AM
itooam itooam is offline
Senior Member
Join Date: Jul 2012
Posts: 100
Default Re: Recency weighted regression

Having spent some time on this, (this area of maths I am very weak)

I think the solution is:
W_{reg} = (Z^{T} A Z+\lambda I)^{-1}Z^TAy

Where A is a diagonal matrix. A bit like the Identity matrix but with weight values i.e.,
|\alpha_1, 0, 0, ... 0|
|0, \alpha_2, 0 ... 0|
|0, 0, 0 .... \alpha_{datasetSize}|

The bit that makes this tricky (for me) is the regularisation. I suppose I could test the above using this formula and then try the same using gradient descent (where I know it will be correct) if the values are close then the above can be considered correct (if I plug in largely varying values of lamba for testing).
Reply With Quote