# Estimating Baselines using ALS

I am trying to figure out how ALS works when minimizing the following formula:

$$\\ \\$$

$$\text{min}_{\lbrace b_u,b_i \rbrace} \sum_{(u,i)\in \mathcal{K}} (r_{ui} - \bar{r} - b_u - b_i )^2 + \lambda_{1}(\sum_{u} b_u^{2} +\sum_{i} b_i^{2})$$

$$\\ \\$$ $$\textbf{Question 1}$$: I would like to know how does Alternating Least Squares work in this case. How does it minimize the equation on the picture? The idea of the whole equation that needs to be minimized, I think, it is like when we do a simple linear regression and we have to fit the line. Am I right? In the Lineal Regression we do $$(y - \hat y)^2$$. In the case of the paper we do $$(r_{ui} - \mu -b_{i}-b_{u})^2 +\lambda(...)$$

Just in case I leave the link: paper

• Several things. First, this is too much information to ask people to read. I recommend linking more and not using large images of text. Try to condense the relevant information. Second, we don't deal with implementation details here. You should probably remove your code to keep your post on topic. Third, you should only ask one question per post. – Philip Raeisghasem May 5 at 6:53
• @PhilipRaeisghasem Thank you! The purpose of the large image is to explain the meaning of each variable, only. – NaveganTeX May 5 at 6:59