biglasso icon indicating copy to clipboard operation
biglasso copied to clipboard

Option for sample weights?

Open mzhao94 opened this issue 7 years ago • 4 comments

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.

mzhao94 avatar Oct 19 '17 01:10 mzhao94

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.

YaohuiZeng avatar Oct 24 '17 20:10 YaohuiZeng

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 avatar Oct 25 '17 06:10 privefl

@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 avatar Nov 06 '17 21:11 YaohuiZeng

@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.

privefl avatar Nov 07 '17 07:11 privefl