Last active
May 25, 2023 21:24
-
-
Save avidale/6668635c318aceebe0142de013a4cf77 to your computer and use it in GitHub Desktop.
inequality constraints in linear regression.ipynb
Please paste your code.
Can I also make intercept positive. if yes, please let me know how? I am using the same code, just making min_coef = 1
@avidale how is the coordinate descent computing the constraints? For example, if I used an interior point solver, it creates a barrier function for inequalities and then a newton line search is used.
EDIT: And what do you mean by "recalculating constraints for every coefficient on each step"?
Thank you very much for sharing. This is what I'm looking for. Is there a way to just constrain specific subset of features and leave everything else as is?
Brilliant solution and well explained. I'm late to the party here but how would one modify this to use weighted-least-squares with constraints?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Its not working.
I am putting 2 conditions together: