biglasso
biglasso copied to clipboard
Option for sample weights?
I was wondering if there was a way to put in sample weights for biglasso. In cv.glmnet there is a "weights" option and it would be very useful for econometrics work.
Thanks for your comment, @mzhao94. That option is not supported in current version. I may add this option later as I am really busy for graduation at this point.
Maybe the simplest way would be to
- make another accessor which access X(i, j) * w[i] instead of just X(i, j)
- replace the BM accessors by a class template (this is actually what I did to port this package's code to my package bigstatsr)
Is that okay with you, @YaohuiZeng?
Actually this could be done for weights on variables too, I think.
@privefl sorry for the delayed reply. Thank you for your suggestions, which sound good to me. I will try to add options for sample/variable weights in next version.
@YaohuiZeng I don't know if this is as easy as I said. There are also scaling and regularization involved. Not sure where to use weights.