Multioutput Fits
These scripts fit surrogate models to multioutput data. Each takes an input/output dataset, splits it into training and testing subsets, fits the surrogate, and produces parity plots, per-sample overlays, and (where applicable) sensitivity bar charts.
kl_fit.py
Build Karhunen–Loève (KL) decompositions of multioutput data.
This script reads a multioutput dataset, performs a KL expansion to reduce its dimensionality, and generates diagnostic plots including explained-variance curves, data-vs-approximation scatter plots, and sample-wise fit comparisons.
- Outputs:
dm_*.png— Diagonal model-vs-approximation scatter plots per output.fit_s*.png— Per-sample overlay of original and KL-reconstructed outputs.
Example:
python kl_fit.py -y ydata.txt -e 5
Arguments:
Flag |
Default |
Description |
|---|---|---|
|
Conditioning x-grid file (default: index array). |
|
|
|
Multioutput data file. |
|
Number of eigenvalues to retain (default: auto at 99%). |
klsurr_fit.py
Build KL-based reduced-dimensional surrogates of multioutput models.
This script combines a Karhunen–Loève expansion with surrogate modelling (Polynomial Chaos or Neural Network) to construct a reduced-dimensional surrogate for multioutput data. It produces parity plots, per-sample fit comparisons, and global sensitivity bar charts.
- Outputs:
dm_*.png— Parity plots per output.fit_s*.png— Per-sample overlay of model and KL+surrogate predictions.sens_klsurr.png— Global sensitivity bar chart.klsurr.pk— PickledKLSurrobject.
Example:
python klsurr_fit.py -x ptrain.txt -y ytrain.txt -s PC -m bcs -o 3
Arguments:
Flag |
Default |
Description |
|---|---|---|
|
|
Input data file. |
|
|
Output data file. |
|
Conditioning x-grid file. |
|
|
|
Output names file. |
|
|
Parameter names file. |
|
0.9 |
Fraction of data used for training. |
|
|
Surrogate type: |
|
|
Fitting method: |
|
|
PC basis type: |
|
1 |
Polynomial chaos order. |
nn_fit.py
Build neural-network-based surrogates for multioutput models.
This script trains a Residual Network (RNet from QUiNN) on
user-supplied input/output data, splits the data into training and
testing sets, and produces parity plots and per-sample fit comparisons.
Requires the QUiNN package.
- Outputs:
dm_*.png— Parity (model vs approximation) plots per output.fit_s*.png— Per-sample overlay of original and NN-predicted outputs.
Example:
python nn_fit.py -x ptrain.txt -y ytrain.txt -t 0.8
Arguments:
Flag |
Default |
Description |
|---|---|---|
|
|
Input data file. |
|
|
Output data file. |
|
Conditioning x-grid file. |
|
|
|
Output names file. |
|
|
Parameter names file. |
|
0.9 |
Fraction of data used for training. |