I am assuming the following model:
$Y = \beta X + \epsilon$
Here both $X$ and $Y$ are matrices. I fit the least squares model without any regularization and get the matrix $\beta$. I would like to do the following now. I want to pick some subset $S$ of rows of $\beta$ using forward stepwise selection such that these rows minimize the squared loss. How should one go about it?