Computing A Weighted Lasso

MediumClassical ML

Reported in interviews at Two Sigma

Problem statement

How would you fit a weighted lasso using a plain lasso solver? Each coefficient has a known positive penalty weight, but the solver accepts only a shared penalty. Explain the rescaling, derive a coordinate update, and describe correctness checks and weight edge cases.

Show hint

Can a change of variables turn a per-coefficient penalty into a single uniform one?

Relevant roles: ML Engineer, Applied Scientist, Research Scientist and Data Scientist.

Related free problems