# How to use weights with Elasticnet regression in python?

I am using Elasticnet from scikit-learn in python, I've also used Glmnet package in R for prototyping. I want to use weights in Elasticnet which apparently is not available as an option/argument in Elasticnet in scikit-learn. However it is available in glmnet/elnet in R.

Has anyone used weights with elasticnet in python? Any insight on how it can be done.

## locked by whuber♦Dec 25 '17 at 23:21

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. See the help center for guidance on writing a good question.

• glmnet supports weights for both samples, and for various predictors to increase or decrease the regularization strength on a by-variable basis. Which are you asking about? – Matthew Drury Jul 29 '16 at 0:23