UncertaintyQuantification.jl icon indicating copy to clipboard operation
UncertaintyQuantification.jl copied to clipboard

Generalize pcebases and multiple PCE outputs

Open fbelik opened this issue 1 month ago • 2 comments

This is based on discussion in Issue 251.

  1. Speed up evaluate call for a PolynomialChaosBasis.
  2. Implement various multi-index sets, now can pass a symbol to PolynomialChaosBasis for the user to specify a total-degree set (was and is still default, ordering just changes), total product set, hyperbolic cross set (sparse alternative), or a "q-ball set" (the Euclidean q-norm of the indices is less than p).
  3. Decluttering of polynomialchaos methods; previously several methods for different types of inputs but were able to be collapsed down into a single method per approach (LS,GQ,etc).
  4. Can pass a vector of outputs to polynomialchaos to generate a vector of PolynomialChaosExpansion objects. Potentially useful when several models are used on the same type of input with different output. Does not break current code as if only a single output is passed, a single PolynomialChaosExpansion object is returned.

fbelik avatar Nov 16 '25 23:11 fbelik

Codecov Report

:x: Patch coverage is 91.91919% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/models/pce/pcebases.jl 83.67% 8 Missing :warning:

:loudspeaker: Thoughts on this report? Let us know!

codecov[bot] avatar Nov 16 '25 23:11 codecov[bot]

Thanks for another PR @fbelik! I wasn't able to review it yet, but I'll definitely get to it this week.

FriesischScott avatar Dec 02 '25 08:12 FriesischScott

Do you have suggested literature for someone not familiar with these alternative index sets? I'd like to know a bit about what they are used for.

I do not have a reference that immediately comes to mind. I have seen both of these pop up in occasional papers. The general idea is that the hyperbolic cross and q-ball (q < 1) multi-index sets correspond to sparse multi-index sets which attain high univariate polynomial degrees but lower cross terms. This is in particular useful when working in high dimensions when the total degree set (polynomial coefficients sum to p) or the total product set (maximum coefficient at most p) require a lot of memory to store. It should also work well with less memory requirements for models with parameters with high first-order contributions but lower second and higher-order contributions. It would not work as well if the higher-order polynomial cross-terms are required for the model.

Here is an example in 10 dimensions. The following two multi-index sets have similar size but the hyperbolic cross and q-ball sets have much higher univariate polynomial degree terms included (e.x. [15,0,0,0,0,0,0,0,0,0]) while they lack high cross terms (e.x. [5,5,5,5,5,5,5,5,5,5]).

julia> length(multivariate_indices(5, 10, :TD))
3003

julia> length(multivariate_indices(18, 10, :HC))
2626

julia> length(multivariate_indices(15, 10, :QB))
2556

fbelik avatar Dec 04 '25 18:12 fbelik

I've synced your branch with master to fix the docs and macos actions.

FriesischScott avatar Dec 16 '25 10:12 FriesischScott