PCEWithGLSorGGMR¶
- class PCEWithGLSorGGMR(inputSample, outputSample, distribution, VYCollection, multivariateBasis, totalDegree, maximumBasisSize, selectedIndices=None, leastSquaresMethod='GLS')¶
Build a Polynomial Chaos Expansion (PCE) metamodel using Generalized Least Squares (GLS) or GLS with Generalized Golgi-Morse Regularization (GGMR).
- Parameters:
- inputSample
Sample Input sample of shape (n_samples, n_input_vars).
- outputSample
Sample Output sample of shape (n_samples, 1).
- distribution
Distribution Probability distribution of the input variables.
- VYCollectionsequence of
CovarianceMatrix Covariance matrices for each output column (length = outputSample.getDimension()).
- multivariateBasis
OrthogonalBasis Orthogonal basis for the PCE (e.g., Legendre, Hermite).
- totalDegreeint
Maximum total degree of the polynomial basis.
- maximumBasisSizeint
Maximum number of basis functions to retain. If the total basis size exceeds this, the least significant coefficients are discarded.
- selectedIndices
IndicesCollection, optional Pre-selected indices of basis functions to use. If None, all indices up to
totalDegreeare considered. Default is None.- leastSquaresMethod{“GLS”, “GGMR”}, optional
Method to solve the least squares problem. Default is “GLS”.
- inputSample
- Attributes:
- result
FunctionalChaosResult The PCE metamodel (available after calling
run()).- covMCollectionlist of
CovarianceMatrix Covariance matrices for the PCE coefficients.
- result
Methods
Return the functional chaos result.
run()Build the PCE metamodel and compute its coefficients.
Notes
The method automatically selects the most significant basis functions if
maximumBasisSizeis smaller than the total basis size. For multi-output problems (outputSample dimension > 1), only the first column is currently supported (see FIXME in code).- __init__(inputSample, outputSample, distribution, VYCollection, multivariateBasis, totalDegree, maximumBasisSize, selectedIndices=None, leastSquaresMethod='GLS')¶
- getResult()¶
Return the functional chaos result.
- Returns:
- result
FunctionalChaosResult The metamodel.
- covMCollectionsequence of
CovarianceMatrix Sequence of covariance matrices associated to each coefficient set (one per column of output sample).
- result
- run()¶
Build the PCE metamodel and compute its coefficients.
Steps: 1. Construct the design matrix from the input sample and basis functions. 2. Solve the GLS problem to estimate coefficients. 3. If necessary, truncate the basis to
maximumBasisSizeand re-fit. 4. Store the result inresultandcovMCollection.- Raises:
- NotImplementedError
If
outputSamplehas dimension > 1 (not yet supported).
otExperimentalMeasurement