LogExpFunctions.jl icon indicating copy to clipboard operation
LogExpFunctions.jl copied to clipboard

Add `loglogistic`, `logitexp`, `log1mlogistic` and `logit1mexp`

Open andrewjradcliffe opened this issue 1 year ago • 5 comments

This takes advantage of LogExpFunctions's accurate implementations of log1pexp and log1mexp, combined with negation in the log-odds domain to provide more accurate and less expensive implementations of the function compositions.

As recommended here, I am submitting these.

Precedent for loglogistic and log1mlogistic is their existence in Stan; it is natural to include their inverses.

andrewjradcliffe avatar May 03 '24 19:05 andrewjradcliffe

As

  • all tests (included the added tests) are passing
  • documentation has been updated
  • the extension interfaces modified to support these 4 functions
  • and tests of the package extensions have been added

please let me know of any additional changes which must be made for this PR to be merged.

andrewjradcliffe avatar May 05 '24 21:05 andrewjradcliffe

May we clarify: include or exclude ChainRulesCore forward/reverse rules?

Last item to adjust, then can merge.

andrewjradcliffe avatar May 07 '24 02:05 andrewjradcliffe

It would be best to not let this bit rot. Moreover, it is easiest to make changes when it is in recent memory.

@devmotion could you clarify with @tpapp whether to include or exclude ChainRulesCore forward/reverse rules?

Once clarified, I can either revert the last commit or leave it in place. Should I then assume that there would be no further obstacles to merging?

andrewjradcliffe avatar May 08 '24 21:05 andrewjradcliffe

Feel free to remove them. Thanks for the ping!

tpapp avatar May 09 '24 08:05 tpapp

Reverted ChainRulesCore support. Should be ready for merge -- @devmotion and @tpapp

andrewjradcliffe avatar May 17 '24 18:05 andrewjradcliffe