-
Notifications
You must be signed in to change notification settings - Fork 9
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
Weighted model #113
base: master
Are you sure you want to change the base?
Weighted model #113
Conversation
np.einsum('ob,of->fob', xh, w), | ||
xh | ||
) | ||
w = self.jac_weight_b_j(j=j) # (observations x features) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seemed like a bug, so I've changed it (I think this is one of the unused function, based on what PyCharm told me).
Hi @davidsebfischer
I think both of these are very related and could be solved essentially by doing this: https://github.com/theislab/batchglm/pull/113/files#diff-2a60c6b6af3d9ce6c634d470674d6a55R49 (just remove the true and replace the |
Sorry I did not see this question before.
definitely also open to suggestions here!
we can change that!
cool, we can definitely do that! |
Ok, I've started with typing + defining some utility functions. There are 4/5 more things I'd like to do:
Do you have any tests locally so that I might check if things are breaking? If not, I will start with some simple unit tests. |
ok for me, but then we have to do this consistently across the package on this PR.
yes, have also thought about this before - great!
nice let s try!
yes we can build this as we go, this is also work in progress in internal functions!
I haven't automated running these but I have test for most functionalities, we could set up continuous integration if you want, happy to spend some time doing that! Important test for example concern accurarcy on the parameter estimates: https://github.com/theislab/batchglm/blob/master/batchglm/unit_test/test_acc_glm_all_numpy.py |
Hi, @davidsebfischer ,
I've started working on the weighted model based on your notes (thanks a lot) and I think I've gotten most of the stuff in numpy right, though I haven't tested this yet.
Questions:
closedform_glm_mean
andclosedform_glm_scale
be modified to include weights?Todos:
Todos to discuss:
My recommendation would be for now, it would be just the weighted NB model in numpy + tests + SWE stuff, the rest could 2 separate PRs (1 for TF, 1 for the rest of the models and numba if desired/needed).
Related CellRank issue: theislab/cellrank#377
P.S. I like how the repo's structure (i.e. the api/external/pkg_constants - it nicely avoids cyclic imports). The only ugly thing is, that you have to import .api.