1
$\begingroup$

I'm doing a least squares linear regression using the numpy.linalg.lstsq with two parameters, i.e.:

$y = \alpha x_1 + \beta x_2 + \gamma$

Where $x_1$ and $x_2$ are lists of size $N$, and the output $y$ is also of size $N$. What is the computational complexity for calculating the parameters $\alpha$, $\beta$, $\gamma$?

I have looked at several similar questions (e.g. Computational complexity of least square regression operation) but I'm not sure how to translate my situations into those terms. I also tried to look at the numpy source code but I'm a bit out of my depth there, to be honest.

$\endgroup$
  • $\begingroup$ Can't you use the linked answer with $C=3$? $\endgroup$ – Fredrik Meyer Sep 19 '16 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.