# sklearn: sklearn.linear_model.HuberRegressor vs sklearn.linear_model.ElasticNet

I am experimenting different loss functions for my regression model. I noticed that in the sklearn, there are:

sklearn.linear_model.HuberRegressor and sklearn.linear_model.ElasticNet

To me, both use the combination of L1 and L2 loss. What exactly is the difference of this? Thanks!

ElasticNet is a linear regression model trained with both $$\iota_1$$ and $$\iota_2$$-norm regularization of the coefficients. This combination allows for learning a sparse model where few of the weights are non-zero like Lasso, while still maintaining the regularization properties of Ridge. Elastic-net is useful when there are multiple features which are correlated with one another. Lasso is likely to pick one of these at random, while elastic-net is likely to pick both.