Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linear penalized regs #21

Open
anzonyquispe opened this issue Mar 26, 2021 · 5 comments
Open

Linear penalized regs #21

anzonyquispe opened this issue Mar 26, 2021 · 5 comments
Assignees

Comments

@anzonyquispe
Copy link
Collaborator

Translate the r-code from this notebook to python script.

@anzonyquispe anzonyquispe self-assigned this Mar 26, 2021
anzonyquispe added a commit that referenced this issue Mar 26, 2021
anzonyquispe added a commit that referenced this issue Mar 26, 2021
anzonyquispe added a commit that referenced this issue Mar 28, 2021
anzonyquispe added a commit that referenced this issue Mar 28, 2021
@alexanderquispe
Copy link
Owner

  1. If the l1_ratio corresponds to alpha , why we have different values for alpha and l1_ratio?

R code
image

Python code
image

there is no difference between 0 and 0.0001?

@alexanderquispe
Copy link
Owner

  1. If we change the number of iterations the results change?
  2. When you regress the first case with LassoCV is because an ElasticNETCV with alpha =1 is a simple Lasso right ?

@alexanderquispe
Copy link
Owner

  1. I don´t fully understand the meaning of this function.

image

I mean, we get g1 + m1 just from the two-equation above, but the while loop is running 5 times the same equation. But then, the return values of g1+m1 will be the results from iteration number 5 right ? what is the meaning of the loop then?
Do you have any idea?

@alexanderquispe
Copy link
Owner

  1. If I understood well the second part Data Generating Process: Approximately Sparse + Small Dense Part, only differs with the first part in the beta composition?

Part 1
image

Part 2
image

@anzonyquispe
Copy link
Collaborator Author

  1. The l1_ratio argument corresponds to sklearn package and alpha argument to glmnet r package. They have the same meaning in estimation. We have problems with estimations when l1_ratio is equal to zero. It is recommended a value close to zero.
  2. I think the number of iterations does not change anything.
  3. Yeah. That is right. They are the same. ElasticNETCV is the general model.
  4. I have the same question. I do not have any idea.4.
  5. Yeah, the author only changed beta.

anzonyquispe added a commit that referenced this issue Apr 8, 2021
alexanderquispe added a commit that referenced this issue Apr 13, 2021
Revision of all codes
anzonyquispe added a commit that referenced this issue Mar 5, 2022
anzonyquispe added a commit that referenced this issue Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants