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

Allow weights #4

Open
jmboehm opened this issue Jan 7, 2020 · 2 comments
Open

Allow weights #4

jmboehm opened this issue Jan 7, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@jmboehm
Copy link
Owner

jmboehm commented Jan 7, 2020

No description provided.

@jmboehm jmboehm added the enhancement New feature or request label Jan 7, 2020
@nilshg
Copy link
Contributor

nilshg commented May 23, 2021

How much effort would this be? I'm currently trying to fit a logistic regression on ~2bn observations, so need to group the data into a Bernoulli format with trials/successes by group and then fit a model to the success rate, using trial counts as weights. This works with GLM.jl, but I also need 5 fixed effects, one with 10,000 levels, so I'm OutOfMemory. I don't think alpaca supports weights (or that alternative glm formulation in R where one passes an n-by-2 matrix of successes and failures as LHS variable), is there anything in the algorithm used that makes this particularly tricky?

@jmboehm
Copy link
Owner Author

jmboehm commented May 23, 2021

I haven't done the algebra, but I would think (hope?) that it's not so hard. In general, you'd have to see how your weights are entering the likelihood function, and whether the equivalence between the iteration step and the weighted linear regression is still present (https://arxiv.org/pdf/1707.01815.pdf). See also this issue in alpaca.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants