Polynomial Chaos Expansion
The Polynomial Chaos Expansion function is intended for use with the Uncertainty Quantification Module, which is required for creating and training the Polynomial Chaos Expansion function. If you already have a model with a trained Polynomial Chaos Expansion function, that function can be evaluated without a license for the Uncertainty Quantification Module. It is also possible to copy and paste, or use the insert component functionality, for a trained Polynomial Chaos Expansion function from one model to another, without a license for the Uncertainty Quantification Module. For more information about this function and its settings, see the Uncertainty Quantification User’s Guide.
The Polynomial Chaos Expansion function () defines a polynomial chaos expansion (PCE) (also called polynomial chaos and Wiener chaos expansion), which is a method for representing a random variable in terms of a polynomial function of other random variables. PCE can be used to, for example, determine the evolution of uncertainty in a dynamical system when there is probabilistic uncertainty in the system parameters. The default Function name is pce1.
Click the Train Model button ()) to compute internal data that is needed before the function can be evaluated. For most changes made in this Settings window, the function needs to be trained again for the changes to take effect. The following settings take effect immediately without retraining:
The Train Model functionality requires a license for the Uncertainty Quantification Module.
Model Settings
From the Settings method list, choose Automatic (the default) or Manual. If you chose Manual, you can enter values for these properties:
Maximum polynomial degree: The maximum polynomial degree to use. The default maximum degree is 30.
Q norm: The Q norm is a value between 0 and 1 (default: 0.5), which controls the hyperbolic truncation of polynomial terms used for functions having more than one argument.
See Surrogate Models — Polynomial Chaos Expansion in the Uncertainty Quantification User’s Guide for more information.
Data
Select a Data sourceFile or Result table to define the data source for the PCE.
If you select File (the default), enter the complete network path and name of the data file in the Filename field, or click Browse to select a text or data file with data in the Interpolation Data dialog box. You can import data files with comma-separated, semicolon-separated, space-separated, and tab-separated data. You can also click the downward arrow beside the Browse button and choose Browse From () to open the fullscreen Select File window. Click the downward arrow for the Location menu () to choose Show in Auxiliary Data () to move to the row for this file in the Auxiliary Data window, Copy Location (), and (if you have copied a file location) Paste Location (). Also choose a decimal separator from the Decimal separator list: Point (the default) or Comma. Click Import () to import the data into the model; otherwise, COMSOL Multiphysics references the data on your file system. Click Export to save the data for the PCE to a file and reference from there instead of including it in the model. Click the Discard button to delete the imported data for the PCE from the model. Click the Refresh button ()to ensure that the file is reread when needed.
If you select Result table, choose the table to use from the Result table list.
Data Column Settings
Based on the content of the data source, a table is available with the following columns:
Columns: the names of the columns.
Type: choose one of the following types: Function name, Argument, or Ignored column depending on the content of the column.
Settings: In this column, the name of the function or argument appears. If the column type is set to Ignored column, the Settings column is empty. For Argument columns, also define the type of probability distribution and the corresponding parameters for the distribution using the Distribution list and associated settings (see below).
When you have selected a column of Argument type, then, in the Distribution list, choose the distribution for the input parameter: Uniform (the default), Normal(μ,σ), LogNormal(μ,σ), Gamma(k,θ), Beta(α,β), Weibull(λ,k), or Gumbel(μ,β). All distributions except the uniform distribution have two distribution parameters shown under the Distribution list, such as the Mean and Standard deviation for a normal distribution and Shape and Scale for a gamma distribution. You specify the distribution parameters in the corresponding text field. All distributions except the uniform distribution and beta distribution have CDF-Lower, CDF-Upper shown under the Distribution list. For a Uniform distribution, also enter values in the Lower bound and Upper bound fields.
For all types except Ignored column, you can edit the name of the function or argument in the Name field underneath and also provide a unit in the Unit field.
Training and Validation
In this section, you can specify a number of settings for the training and validation of the PCE.
In the Relative tolerance field, specify a relative tolerance (default: 0.001) to use when deciding the required polynomial degree of the trained function.
From the Out-of-range data handling list, choose Warning (the default) to receive a warning for out-of-range data, or choose Cancel training to stop the training if out-of-range data appears.
In the Maximum matrix size field, specify the largest matrix size (default: 2000). The matrix size is equal to the number of rows in the input data.
Under Post-training test data, choose an option from the Validation data list: None, Random sample of data values, Every N:th data value, Last part of data value, or Separate table.
Depending on choice of validation data, additional settings are available.
If you chose any other option than None:
Specify a table to use for the validation error using the Validation error table list. Choose New to create a new table.
Specify a table to use for the validation predicted data using the Validation predicted data table list. Choose New to create a new table.
If you chose Random sample of data values, also specify a Random seed (see above).
If you chose Separate table, a Validation data table list is available, and the Validation data fraction setting is not available.
Plot Parameters
From the Function name list, choose the function values to plot.
The plot parameters are set automatically when the function is trained, from the lower bound and upper bound settings for the corresponding probability distribution. It is possible to change the values manually after training. Then use the table below to set the range for arguments in preview plots. For each argument, enter a Lower limit, and an Upper limit in the Plot Parameters table. Use the check boxes in the Plot column to control which arguments to use in the plot (you can select a maximum of three arguments). If you clear a check box, a constant value, taken from the argument’s lower limit, is used. Constant arguments do no use an axis in the plot. These values and settings are used when you click the Plot button () or the Create Plot button () at the top of the Settings window.