RobinHankin / spray

sparse arrays and fast multivariate polynomials
https://robinhankin.github.io/spray/
2 stars 2 forks source link

Integral of a polynomial over a simplex with 'spray' (not an issue) #37

Open stla opened 1 year ago

stla commented 1 year ago

Hi,

I wrote this blog post which involves spray. Maybe you would like to link it in the README (or include the function in the package?).

RobinHankin commented 1 year ago

hello Stéphane: great to hear from you!

I've been enjoying that blog post very much, and would be delighted to cite it in the spray package. Do you have a preferred citation format for the work?

I got very interested in integration over simplexes a few years ago, but I didn't know about the work by Lasserre. I guess it is quite recent which is why I missed it. Actually my main use for integrating over a simplex would be in the hyper2 package which includes a vignette that discusses generalizations of the Dirichlet distribution (you need to integrate over a simplex to get the normalization constant). But the method is clunky and slow and inefficient, I wonder if I could use or adapt Lasserre's work?

-- Robin K. S. Hankin Associate Professor, computational statistics

On Tue, Dec 6, 2022 at 1:22 AM stla @.***> wrote:

Hi,

I wrote this blog post https://laustep.github.io/stlahblog/posts/integratePolynomialOnSimplex.html which involves spray. Maybe you would like to link it in the README (or include the function in the package?).

— Reply to this email directly, view it on GitHub https://github.com/RobinHankin/spray/issues/37, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFFZUUMK2WSAL5AOBVGK2DWLXM7BANCNFSM6AAAAAASUGTJYA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

stla commented 1 year ago

Hi Robin,

Are you aware of the SimplicialCubature package? It is good. It implements adaptive integration on simplices.

I don't have a preferred citation format for the blog post.

Actually I'm wondering whether Lasserre's results are really new. Because everything is derived from the formula for the integral of a monomial over the unit simplex, and I'm not sure this is new.

stla commented 1 year ago

Ah but for a Dirichlet distribution the support is the boundary of a simplex, like x_1 + ... + x_n = 1. This is not the simplex x_1 + ... + x_n <= 1. So the SimplicialCubature package does not help here.

stla commented 1 year ago

Hi Robin,

I've just done qspray, a GMP version of spray. It allows to get the value of the integral as an exact rational number.