-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Linear regression example in rust. #3
Comments
Any reason you can't use PyMC? |
Just using pymc is the easiest way to do this for sure. |
@twiecki Having recently started to code in rust, I have really enjoyed the experience and want to see how far I can take my work using it, but perhaps this is a bridge too far at the moment. @aseyboldt The main sticking point was conceptualizing what exactly the gradient is that I should assign in the Thank you both for your quick replies. Much appreciated. |
You can also just use JAX in your PyMC model definition if that helps. Otherwise it's the scan route which is pretty confusing indeed and tends to be slow, although current work tries to fix that. |
Yes, that's it :-) The library you mentioned won't work too well though. It only supports forward mode autodiff, which is a pretty bad fit when you want to compute gradients. We'd really like to have backward mode autodiff. |
Piggybacking on this issue to request an example with parameter transforms like the logit. Also, wrt autodiff, there's an ongoing project to integrate Enzyme AD into rustc. And thanks for the awesome crate! |
Even right now we could use dfdx, candle burn or tch-rs. |
Hello,
I am having trouble understanding how to set up the logp function for my use case, specifically the gradient term. I have managed to implement my model using emcee, as this doesn't require a gradient term but I would really like to use NUTS directly from rust!
A slightly more involved example, along the lines of this would be very helpful to understand how to fit a model (including priors) to data, from which I can extrapolate into my own use case.
Thank you for your work on this excellent crate.
The text was updated successfully, but these errors were encountered: