FunctionalChaosAlgorithm with your own orthonormal basis construction

Hi,

Using ot.FunctionalChaosAlgorithm(), I would like to know if it’s possible to give your own construction of the orthonormal basis in the AdaptativeStrategy().
fourier_chaos

Best,
Ludovic

Hi,

Unless you code it in C++, there is no way to define your own orthonormal basis in Python. Nevertheless, you have some capabilities which may help you:

  • The FourierSeriesFactory class allows to build the Fourier orthonormal chaos wrt the Uniform(-1,1) distribution, which can be used with any uniform distribution as FunctionalChaosAlgorithm will build the affine transformation to map it into the Uniform(-1,1) distribution for you.
  • The StandardDistributionPolynomialFactory class allows to build the orthonormal polynomial basis for any discrete or continuous 1D distribution if it has finite moments of any order. Beware of the fact that the distribution has to be uniquely defined by its moment to get an Hilbert basis this way. For example, the orthonormal polynomials associated to a LogNormal distribution will not allow to approximate all the possible functions, e.g. x->1/x

Cheers

Régis

Hi,
If the distribution which is associated to the orthonormal basis is known, it can be defined in Python using the PythonDistribution. Then StandardDistributionPolynomialFactory creates the orthonormal basis from the distribution using the modified Stieljes algorithm (an improved Gram-Schmidt method).
But I do not think that this fits your need, because you do not have such a distribution isn’it?
Regards,
Michaël