βββ code_files # Code for Polynomial Chaos Expansion
βββ pce_core.py # PolyChaos Class
βββ pce_utils.py # Helper Functions
βββ run_analysis.py # User Model, Parameters, and Execution
βββ results
βββ csvFiles # Roughness statistics and PySR searching results
βββ loss_plot # Symbolic model loss visualization
Core steps for applying PCE to build a surrogate model, quantify uncertainty, and perform global sensitivity analysis are summarized below.
βββ PCE_Implementation
β βββ PolyChaos
β β βββ __init__ # Initialize dimension, order, distributions, and parameters
β β βββ create_instance # Generate multi-index set and the multivariate polynomial basis functions
β β βββ generate_multi_index # Generate the total-order multi-index set
β β βββ norm_factor # Compute the normalization factor for orthogonal polynomials
β β βββ create_latin_hypercube_samples # Generate input samples using Latin Hypercube Sampling (LHS)
β β βββ regression_fit # Fit PCE coefficients using Least-Squares Regression (LSR)
β β βββ norm_fit # Compute statistical moments (mean and variance)
β β βββ sobol # Calculate Sobol Sensitivity Indices
β β βββ evaluate # Evaluate the PCE model at given input points
β βββ main # Execution Flow
β βββ Initialization
β βββ Sampling # Generate LHS points
β βββ Evaluate_Model # Evaluate Your Model at the LHS points
β βββ Fit_PCE # Determine PCE coefficients
β βββ Compute_Stats # Compute mu and sigma
β βββ Validate_PCE # Validate the PCE on your own data points
β βββ Sensitivity # Compute Sobol sensitivity indices