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

Option for sample weights? #9

Open
mzhao94 opened this issue Oct 19, 2017 · 4 comments
Open

Option for sample weights? #9

mzhao94 opened this issue Oct 19, 2017 · 4 comments

Comments

@mzhao94
Copy link

mzhao94 commented Oct 19, 2017

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.

@YaohuiZeng
Copy link
Collaborator

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.

@privefl
Copy link
Contributor

privefl commented Oct 25, 2017

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.

@YaohuiZeng
Copy link
Collaborator

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

@privefl
Copy link
Contributor

privefl commented Nov 7, 2017

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

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

3 participants