# Why is there a constant in the objective function of the *best subset selection problem*?

This article presents the following formulation of the best subset selection problem

$$\min_{\|\beta\|_0\leq k}\frac{1}{2}\|y-X\beta\|^2_2$$

I wonder where the $$1/2$$ comes from. Help appreciated.

The factor of $$\frac{1}{2}$$ is just for convenience, so that the Hessian of the objective does not have a factor of two.
The argmin (optimal value of $$\beta$$) is the same, whether or not the factor $$\frac{1}{2}$$ is included.
Note that rather than $$\frac{1}{2}$$, some "authors" use $$\frac{1}{2n}$$, This also does not affect the argmin.
• @k88074 Without the factor of 1/2 the Hessian of the objective would be $2X^TX$. With the factor of 1/2, the Hessian is $X^TX$. – Mark L. Stone Jan 16 at 12:50
• I the following reasoning correct? If want to minimize the objective (forget the constraint), I set the first derivative of the objective to zero, that is $-2Xy+2X^\top~X\beta=0$. Why does the $2X^\top~X$ bother us? We still get the same $\beta$ – k88074 Jan 18 at 8:00