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

Also export gaverstehfest as alias to postwilder. #24

Closed
lrnv opened this issue Jul 16, 2021 · 6 comments · Fixed by #25
Closed

Also export gaverstehfest as alias to postwilder. #24

lrnv opened this issue Jul 16, 2021 · 6 comments · Fixed by #25

Comments

@lrnv
Copy link

lrnv commented Jul 16, 2021

Hi,

Would it be possible to also export a gaverstehfest method that would be an alias for the current postwilder ? I was looking for this algorithm and was about to start a fork to implement it because I did not saw it.

In a large part of the literature, the name of this algorithm is 'Gaver-Stehfest', in the names of Gaver, who found the approximating series, and Stehfest, who found the accelerated convergence tricks. Post-Wilder are the ones that found the continuous formula that Gaver's work derives from.

Also, the principal cited source in postwilder.jl is written by Stehfest, not Post-Wilder.

I do not ask for a change of name -- would probably be breaking --, an alias would be enough.

@heltonmc
Copy link
Member

heltonmc commented Jul 18, 2021

Thanks for bringing attention to this because the method does have competing naming. In my field it is generally referred to as the "Post-Widder" formula whereas I have seen many instances where "Gaver-Stehfest" is preferred. I'm not for sure adding two methods for this would lead to less confusion. It might be easiest to do this on the user end if they prefer one name over the other by defining const stehfest = postwid in their module after importing the library. It should be mentioned that this is a relatively recent introduction to the package so it does not appear in the docs.

A name change would be fine and fairly easy if we think that stehfest is the consensus name in the field. That paper is definitely cited a lot. I definitely don't want to be the one to assign credit to an algorithm because it kind of becomes a slippery slope on how far back something is derived from. I'm not for sure the Stehfest paper should be referred to as the principle source. I think the most exhaustive would be something like:

[1] Post, Emil L. "Generalized differentiation." Transactions of the American Mathematical Society 32.4 (1930): 723-781.
[2] Widder, David V. "The inversion of the Laplace integral and the related moment problem." Transactions of the American Mathematical Society 36.1 (1934): 107-200.
[3] T. (1943). The Laplace Transform. By D. V. Widder. Pp. x, 406. 36s. 1941. Princeton Mathematical series, 6. (Princeton University Press; Humphrey Milford). The Mathematical Gazette, 27(273), 37-39. doi:10.2307/3605681
[4] Gaver Jr, Donald P. "Observing stochastic processes, and approximate transform inversion." Operations Research 14.3 (1966): 444-459.
[5] Stehfest, Harald. "Algorithm 368: Numerical inversion of Laplace transforms [D5]." Communications of the ACM 13.1 (1970): 47-49.

But yes, Stehfest proposed a discrete version of the Post-Widder formula which is what is being used. A name change may also avoid confusion with Post's formula mentioned in #10.
Thanks for opening this discussion as hopefully it will provide a good resource for those using the algorithm.

@lrnv
Copy link
Author

lrnv commented Jul 19, 2021

Thanks for gathering the bibliography, I completely agree with your choices of citations. Some remarks:

  • From the sources you quoted, we can see that Post and Wilder are talking about the continuous and theoretical case, without the discretisation that your algorithm uses. This discretisation is, 30-35 years later, introduced by Gaver and modified (convergence acceleration) by Stehfest.
  • Wikipedia quotes Post and Wilder for the continous inversion formula there : https://en.wikipedia.org/wiki/Inverse_Laplace_transform#Post's_inversion_formula
  • French wikipedia (sorry no english translation) quotes Gaver-Stehfest under "Methodes numériques d'inversions" == "Numerical inversion methods", alongside Fourrier's inversion, and only quotes Post-Wilder as a 'Inversion formula' later "for continuous and bounded functions only". https://fr.wikipedia.org/wiki/Transformation_inverse_de_Laplace#M%C3%A9thodes_num%C3%A9riques
  • Google scholar gives a lot of results for "Gaver-Stehfest algorithm" and "Post-Wilder formula" but None (zero) for "Post-Wilder algorithm".
  • Kuznetsov, which recently prooved convergence results of the method, uses the 'Gaver-Stehfest' name. Also see References therein;

I could argue more, but you already understood that I'm voting for a change of name to gaverstehfest, GaverStehfest or any capitalisation that suits the package naming conventions ;)

Edit : I completely agree that #10 is indeed what should be named "Post-Wilder". In other languages than Julia it might not be so clear, but here we have formal differentiations techniques that allows exploitation of these kind of 'theoretical' results directly, without discretisation.

@heltonmc
Copy link
Member

Thanks for your notes! I do agree, and would be happy to make these changes. I think some of the confusion lies maybe in this review paper [1] which mentions the Post-Widder formula under the Gaver-Stehfest method. The papers in my field cite this review article and refer to it as "Post-Widder" which I'm leaning towards perhaps being a mischaracterization :) In fact, it looks like the author is also the author of mpmaths Inverse laplace methods [2] which names it just stehfest. At this point it may be best to have one function that dispatches to different methods depending on a keyword or something to preserve some of the namespace. But that is a much bigger change...

[1] Kuhlman, Kristopher L. "Review of inverse Laplace transform algorithms for Laplace-space numerical approaches." Numerical Algorithms 63.2 (2013): 339-355.
[2] https://mpmath.org/doc/1.0.0/calculus/inverselaplace.html

@jlapeyre
Copy link
Collaborator

Wow, this is a bit confusing. To make it clear in this thread, the code for the algorithm in question was contributed by @heltonmc .
After briefly reviewing the issue:

  • I personally prefer Gaver-Stehfest. I agree with the argument above. It seems that this is more than just a particular way of implementing the Post-Widder method.
  • I think the best course is to follow the consensus in other numerical packages, demos, and discussions. That would be something involving stehfest and or gaver.
  • Including some text or pointers for discoverability, linking post-widder and gaver-stehfest is a great idea.
  • I share the common opinion that aliases in libraries are a bad idea. I think the best solution is to introduce a better name, say "gaverstehfest", and deprecate the existing name. Then remove the old name with an appropriate bump in the version number.

@heltonmc
Copy link
Member

Thanks @jlapeyre ! I went ahead and made these changes and submitted #25. I've talked with a few other people on this and it seems like "Gaver-Stehfest" is the preferred name which is often how it is referred to in academic papers. I changed the name to gaverstehfest.

This also frees up #10 to be named something like postwidder which is a better name fit in the future (maybe with Diffractor.jl when more stable)...

This is my mistake. Thank you everyone.

@lrnv
Copy link
Author

lrnv commented Oct 19, 2021

@heltonmc Thanks a lot ! This will probably avoid the confusion I had when finding your package. Made a few comments on your PR, minor stuff.

I cannot wait to see how Julia handles the implementation of #10 !

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

Successfully merging a pull request may close this issue.

3 participants