You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
I have the following pipeline.
First I apply ridge regression using 10-cv to find the best lambda.
I get same lambda max and lambda best as in R cv.glmnet.
Next, I refit the model using the best lambda from the first step, without intercept and compare it to the results of R glmnet.
The coefficients and predictions are different. Why is that?
Comparison of coefficients:
R
(Intercept) 0
f1 -0.004059542
f2 0.377331808
f3 1.006589044
f4 0.876858914
f5 0.140710854
f6 730268.470575249
f7 244447.850561236
f8 537663.923355049
f9 176279.892636801
f10 662.748853227
f11 739399.127039033
Hi,
I have the following pipeline.
First I apply ridge regression using 10-cv to find the best lambda.
I get same lambda max and lambda best as in R cv.glmnet.
Next, I refit the model using the best lambda from the first step, without intercept and compare it to the results of R glmnet.
The coefficients and predictions are different. Why is that?
Comparison of coefficients:
R
(Intercept) 0
f1 -0.004059542
f2 0.377331808
f3 1.006589044
f4 0.876858914
f5 0.140710854
f6 730268.470575249
f7 244447.850561236
f8 537663.923355049
f9 176279.892636801
f10 662.748853227
f11 739399.127039033
python:
Intercept 0
f1 -0.16957
f2 0.33352
f3 0.80749
f4 0.71330
f5 0.11385
f6 801091.27661
f7 293769.02256
f8 557147.70998
f9 251954.31707
f10 797640.12411
f11 1086129.27954
Thanks
The text was updated successfully, but these errors were encountered: