0
$\begingroup$

I have a regression problem where I don't want the coefficients to be negative. Is setting negative coefficients of OLS to zero the same as constraining the coefficient to be non-zero and solving it through a convex optimiser as a quadratic problem?

I've thought about this from a geometric perspective. In OLS, $\beta^TX$ is the shadow of $y$ onto column space of $X$. The solution is where $y - \beta^TX$ is perpendicular to $X$. Thus, $y - \beta^TX$ is minimised. If one of the coefficients in $\beta$ is constrained (by replacing a negative value with zero, call this new vector $\theta$), $y - \theta^TX$ is still the vector with the smallest norm?

$\endgroup$
3