As a part of the NODDI model, we were hitting a bottleneck while fitting due the Legendre integral required for computing the Watson Distribution. For those who are new to Numerical Methods, here are some of my notes that will help you understand how to Legendre-Gauss is computed using Legendre Polynomials:
We first start with evaluating the Polynomial between [-1 to 1] interval and the n extend it to any interval [a, b].
Trick to convert the above evaluation between any defined interval [a, b]...
Following is the link to the Cythonized code for Legendre Integrals: Branch Link