How do you handle categorical variables in Lasso?

How do you handle categorical variables in Lasso?

When dealing with categorical variables in LASSO regression, it is usual to use a grouped LASSO that keeps the dummy variables corresponding to a particular categorical variable together (i.e., you cannot exclude only some of the dummy variables from the model).

Can Lasso take factor variables?

In this sense, Lasso is a proper method for factor data analysis, as it takes care of difficulties described above. However, the variable selection property of Lasso yields a new problem: partial selection of dummy variables.

How does glmnet’s standardize argument handle dummy variables?

In short, yes – this will standardize the dummy variables, but there’s a reason for doing so. The glmnet function takes a matrix as an input for its X parameter, not a data frame, so it doesn’t make the distinction for factor columns which you may have if the parameter was a data.frame.

Are the lasso coefficients interpreted in the same way as the OLS maximum likelihood?

Let me rephrase: Are the LASSO coefficients interpreted in the same way as, for example, OLS maximum likelihood coefficients in a logistic regression? LASSO (a penalized estimation method) aims at estimating the same quantities (model coefficients) as, say, OLS maximum likelihood (an unpenalized method).

When to use a grouped lasso in Lasso regression?

1 Answer 1. When dealing with categorical variables in LASSO regression, it is usual to use a grouped LASSO that keeps the dummy variables corresponding to a particular categorical variable together (i.e., you cannot exclude only some of the dummy variables from the model).

What is the penalty for modified group lasso?

A useful method is the Modified Group LASSO (MGL) described in Choi, Park and Seo (2012). In this method the penalty is proportional to the norm of the β vector for the set of dummy variables.