StackExchangeCodes icon indicating copy to clipboard operation
StackExchangeCodes copied to clipboard

ridge/lasso regression with non -negative coefficients when data is sparse one hot data

Open Sandy4321 opened this issue 4 years ago • 6 comments

great code but do you have code for ridge/lasso regression with non -negative coefficients when data is sparse one hot data and data matrix is very big? for example data matrix is

1 0 0 0 1 0 1 0 1 0 0 0 0 1 1 etc

for example for FISTA solver?

Sandy4321 avatar Aug 31 '21 20:08 Sandy4321

Please open a question on Signal Processing Stack Exchange, link it here and I will answer it.

Pay attention the code isn't for commercial use.

RoyiAvital avatar Sep 01 '21 05:09 RoyiAvital

sure done link is https://dsp.stackexchange.com/questions/77048/plain-python-numpy-code-for-ridge-lasso-regression-with-non-negative-coefficient

Sandy4321 avatar Sep 01 '21 14:09 Sandy4321

The question in the link isn't what's you asked above.

If you ask how to solve $ \frac{1}{2} {\left| A x - b \right|}{2}^{2} + \lambda {\left| x \right|}{1} $ subject to $ {x]_{i} \geq 0 $ then I can help and it is a valid question.

RoyiAvital avatar Sep 02 '21 06:09 RoyiAvital

yes this optimization is part of question is there some specific if data is sparse and values are 0s and 1s - one hot data?

Sandy4321 avatar Sep 02 '21 13:09 Sandy4321

do you want me to create new question exactly like $ \frac{1}{2} {\left| A x - b \right|}{2}^{2} + \lambda {\left| x \right|}{1} $ subject to $ {x]_{i} \geq 0 $ ?

Sandy4321 avatar Sep 02 '21 19:09 Sandy4321

in any case I created new question https://dsp.stackexchange.com/questions/78077/plain-python-code-for-ridge-lasso-multivariate-regression-for-non-negative-coeff

Thanks

Sandy4321 avatar Sep 02 '21 19:09 Sandy4321