FunctionalChaosAlgorithm with your own orthonormal basis construction


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



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