1 #ifndef POLYNOMIALCHAOSEXPANSION_H_
2 #define POLYNOMIALCHAOSEXPANSION_H_
11 namespace Approximation {
34 std::shared_ptr<muq::Utilities::MultiIndexSet>
const& multisIn,
35 Eigen::MatrixXd
const& coeffsIn);
38 std::shared_ptr<muq::Utilities::MultiIndexSet>
const& multisIn,
39 unsigned int outputDim);
42 std::shared_ptr<muq::Utilities::MultiIndexSet>
const& multisIn,
43 Eigen::MatrixXd
const& coeffsIn);
46 std::shared_ptr<muq::Utilities::MultiIndexSet>
const& multisIn,
47 unsigned int outputDim);
55 Eigen::VectorXd
Mean()
const;
66 static std::shared_ptr<PolynomialChaosExpansion>
ComputeWeightedSum(std::vector<std::shared_ptr<PolynomialChaosExpansion>> expansions,
67 Eigen::VectorXd
const& weights);
81 Eigen::VectorXd
SobolSensitivity(std::vector<unsigned int>
const& targetDims)
const;
106 static std::shared_ptr<PolynomialChaosExpansion>
FromHDF5(std::string filename, std::string groupName=
"/");
132 static std::shared_ptr<PolynomialChaosExpansion>
ComputeWeightedSum(std::vector<std::shared_ptr<PolynomialChaosExpansion>> expansions,
133 Eigen::VectorXd
const& weights,
134 std::shared_ptr<muq::Utilities::MultiIndexSet>
const& polynomials,
135 std::vector<std::vector<unsigned int>>
const& locToGlob);
Class for defining expansions of basis functions defined by a MultiIndexSet and collection of IndexSc...
Factory class for constructing a pseudo-spectral polynomial chaos approximation using a fixed quadrat...
A class for representing and using expansions of orthogonal multivariate polynomials.
static std::shared_ptr< PolynomialChaosExpansion > FromHDF5(std::string filename, std::string groupName="/")
Loads an expansion from an HDF5 file.
Eigen::MatrixXd Covariance() const
Eigen::VectorXd Mean() const
Eigen::VectorXd GetNormalizationVec() const
Eigen::VectorXd Variance() const
compute the variance of the current expansion
Eigen::VectorXd Magnitude() const
Compute the L2 norm of each output.
static std::shared_ptr< PolynomialChaosExpansion > ComputeWeightedSum(std::vector< std::shared_ptr< PolynomialChaosExpansion >> expansions, Eigen::VectorXd const &weights)
Eigen::MatrixXd TotalSensitivity() const
Compute all Sobol total sensitivities. Rows are outputs, each column is an input.
virtual ~PolynomialChaosExpansion()=default
PolynomialChaosExpansion(std::shared_ptr< OrthogonalPolynomial > const &basisCompsIn, std::shared_ptr< muq::Utilities::MultiIndexSet > const &multisIn, Eigen::MatrixXd const &coeffsIn)
virtual void ToHDF5(muq::Utilities::H5Object &group) const override
Write PCE to HDF5 file.
Eigen::MatrixXd MainSensitivity() const
Eigen::VectorXd SobolSensitivity(unsigned int targetDim) const
Compute the main sensitivity index for the input dimension, for each output dimension.