# What does the index variable k define in the Lasso regularization function

In the Lasso L1 regularization, from where comes the value of the variable $k$ in the second part of the function? Why isn't it $n$, too?

$$L(\beta) = \sum_{i=1}^n (y_i - \phi(x_i)^T \cdot \beta)^2 + \lambda \sum_{j = 1}^k l(\beta_j)$$

$\beta$ is the parameter vector, $y$ the output vector and $x$ the input vector.

$k$ is the length of $\beta$, the number of coefficients. The penalty is a function of the coefficients, not of the data.
• Right, I thought the dimension for instance $\beta$ and $y$ have to be the same, that's why I had the confusion. May 7 '12 at 19:13