cdt15 / lingam

Python package for causal discovery based on LiNGAM.
https://sites.google.com/view/sshimizu06/lingam
MIT License
366 stars 56 forks source link

code of Adaptive Lasso #26

Open Boyle-Coffee opened 3 years ago

Boyle-Coffee commented 3 years ago

I found a difference between the code of Adaptive Lasso in this package and the code in R package. This is the code in this package: 图片 And This is the code in R package: 图片 It is different that the R package let the X divided by the weights which was generated from linear regression while this package let the X times the weights. And here is the formula I found: 图片

ikeuchi-screen commented 3 years ago

@Boyle-Coffee Thanks for using lingam.

In the paper, weights are defined as w=1/|beta|^gamma . Then, X*=X/w and beta=beta**/w are defined.

So, instead of dividing X by w, we multiply X by |beta|^gamma. In our code, we have named the variable |beta|^gamma as weights.

Boyle-Coffee commented 3 years ago

OK, thank you very much.