# Thread: Gradient of Multiple Linear Regression – Vectorized Version of ALS Update Formulas

1. ## Gradient of Multiple Linear Regression – Vectorized Version of ALS Update Formulas

Based on the attached image, how do we differentiate/get the gradient of the cost function $\displaystyle \min\limits_{x\geq0}||y-\bar{A}x||^2_2$? Refer to the attached image for the exact update rule function for both Matrices.

2. ## Re: Gradient of Multiple Linear Regression – Vectorized Version of ALS Update Formula

Originally Posted by zerofrey
Based on the attached image, how do we differentiate/get the gradient of the cost function $\frac{1}{2} min_x>=0||y-A'x||^2_2$ ? refer to the attached image for the exact update rule function for both Matrices.
reposted to correct latex

3. ## Re: Gradient of Multiple Linear Regression – Vectorized Version of ALS Update Formula

@romsek - Wrong latex. There's no 1/2. Please don't just edit something you are uncertain of. If you don't know the answer, better yet don't interrupt. This is a serious concern.

4. ## Re: Gradient of Multiple Linear Regression – Vectorized Version of ALS Update Formula

You used the wrong tags for this forum and I corrected that.

Blow it right out your ass buddy.

A serious concern... Quick Robin to the Internet!

5. ## Re: Gradient of Multiple Linear Regression – Vectorized Version of ALS Update Formula

reposted to correct latex - This was what you said not a problem of tag.

6. ## Re: Gradient of Multiple Linear Regression – Vectorized Version of ALS Update Formula

Originally Posted by zerofrey
reposted to correct latex - This was what you said not a problem of tag.
it's what I always write when someone uses the wrong tags. Usually [math] [\math] instead of \$\$.

7. ## Re: Gradient of Multiple Linear Regression – Vectorized Version of ALS Update Formula

Wait a minute, how do you define tags? For me it's different from latex. Why did you say I had a mistake in my latex? Can you pinpoint as to where? All I see is you put (1/2) prior to the min function.

8. ## Re: Gradient of Multiple Linear Regression – Vectorized Version of ALS Update Formula

Originally Posted by zerofrey
Wait a minute, how do you define tags? For me it's different from latex. Why did you say I had a mistake in my latex? Can you pinpoint as to where? All I see is you put (1/2) prior to the min function.
Looking carefully at the LaTex in each post I can see they are identical.

All I can assume is that embedding your code inside the tags seems to have messed up the interpreter.

I read your post. Like so many others it used the wrong LaTex coding delimiters (I call them tags) and your LaTex was just showing up as error.

I fixed it just as I have many other posts simply by cutting and pasting your code and changing the delimiters.

I'm not sure why your original post looks ok now. You or someone must have edited since.

My problem with you is coming in here and telling me not to interrupt like you own the bloody place. Is that how you acts in real life?

If you have some issue behave like a civilized person and ask what the problem was.

9. ## Re: Gradient of Multiple Linear Regression – Vectorized Version of ALS Update Formula

Originally Posted by zerofrey
Based on the attached image, how do we differentiate/get the gradient of the cost function $\displaystyle \min\limits_{x\geq0}||y-\bar{A}x||^2_2$? Refer to the attached image for the exact update rule function for both Matrices.
I'm not quite sure what you are asking.

The gradient of the norm you have there, i.e.

$\nabla \|y-\bar{A}x\|_2^2 = -2(\bar{A})^T(y-\bar{A}x)$

in order to find the x that minimizes this norm you have to solve for the gradient equal to 0 and this solution is clearly $\hat{x}=(\bar{A})^{-1}y$