-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Implement more types of measurable elemwise transformations #6631
Comments
@ricardoV94 is this just a continuation of the work done here https://github.com/pymc-devs/pymc/pull/6414/files? If so I can follow what I did there and knock a few of these off |
Yes, 👍 |
I've created Transform classes for cosh, sinh, tanh, erf, erfc however there doesn't appear to be an inverse function available for erfcx in pytensor or |
You can exploit the equivalence between erfcx and erfc https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.erfcx.html So you don't need a specific transform, just to rewrite it into that form. |
So if I rewrite it into that form I can get the foward function, but I don't understand how to get the backward function from that? This discussion on the inverse of erfcx in Matlab seems to suggest writing a specific functon https://www.mathworks.com/matlabcentral/answers/302915-inverse-of-erfcx-scaled-complementary-error-function |
@LukeLB my bad, I didn't notice that Writing a specific function seems like a nice (but perhaps low impact) challenge. Up to you if you want to pursue it ;) |
Not to worry, it did have me confused for a bit there! This is all a learning experience for me so happy to add value (even if small) wherever I can. What do you reccomend I do? Presumably open a new issue in PyTensor and link to this issue? Or can I just directly put in a PR on PyTensor for the function? |
I think you can implement it directly in pymc using Scan and Switch statements as building blocks. |
@LukeLB any interest in picking some of the new ones I added: arcsinh and arctanh? A user on discourse was asking how to implement the sinh-arcsinh normal distribution: https://discourse.pymc.io/t/the-sinh-arcsinh-normal-distribution/12136 The only ingredient missing is the arcsinh I think |
@ricardoV94 really sorry I seem to have messed up by notifications when switching email addresses and didn't get an email through for this. Yes, I'd be interested in implementing these additional transformations! I'll have a look this week. |
No problem @LukeLB, still very much welcome and timely :) |
Fab, I'll let you know how I get on :) |
Closed via #6826 |
We already have support for
Other operations we could support
pymc/pymc/logprob/transforms.py
Line 339 in f3ce16f
Other operations we can support via rewrites to already supported forms
Example of such rewrites:
pymc/pymc/logprob/transforms.py
Lines 467 to 483 in f3ce16f
The text was updated successfully, but these errors were encountered: