Obtain coefficients using least square method of an equation with TWO variables (multidimensional)

33 Views Asked by At

How do I get the coefficient $a$ and $b$ from this equation using least square method? What is the best way to solve this? $$ \{{a, b\}}=argmin_{\{a,b\}}\sum_{k1,k2}(\theta(k_1,k_2)−(ak_1+bk_2))^2 $$ I tried this method, but I'm not sure it's correct:

Let's say $\theta(k_1,k_2)$ is a matrix of $60 x 60$ (constant/values), but $\theta(k_1,k_2)\approx ak_1+bk_2$, thus let $C$, $A$ and $Y$ be a matrix:

$Y=$ $$ \begin{matrix} 1&2&3&.&.&.&60\\ .&.&.&.&.&.&.\\ .&.&.&.&.&.&.\\ .&.&.&.&.&.&.\\ 60&.&.&.&.&.&60 \end{matrix} $$ $A=$ $$ \begin{matrix} a&1\\ 1&b \end{matrix} $$ $C=$ $$ \begin{matrix} k_1\\ k_2 \end{matrix} $$ From here how do I solve it? Please guide me. Thanks in advance!

Reference paper: Here (Section III)