Generalize pcebases and multiple PCE outputs
This is based on discussion in Issue 251.
- Speed up
evaluatecall for aPolynomialChaosBasis. - Implement various multi-index sets, now can pass a symbol to
PolynomialChaosBasisfor 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 thanp). - Decluttering of
polynomialchaosmethods; previously several methods for different types of inputs but were able to be collapsed down into a single method per approach (LS,GQ,etc). - Can pass a vector of outputs to
polynomialchaosto generate a vector ofPolynomialChaosExpansionobjects. 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 singlePolynomialChaosExpansionobject is returned.
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!
Thanks for another PR @fbelik! I wasn't able to review it yet, but I'll definitely get to it this week.
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
I've synced your branch with master to fix the docs and macos actions.