# How to bulid PCE model for given data?

**URL:** <https://uqworld.org/t/how-to-bulid-pce-model-for-given-data/1814>\
**Category:** Community Q&A and How To\
**Tags:** copulas, input, pce\
**Created:** [March 5, 2023, 2:13pm UTC](https://uqworld.org/t/how-to-bulid-pce-model-for-given-data/1814 "2023-03-05T14:13:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![YuanXi\_Wu](https://uqworld.org/user_avatar/uqworld.org/yuanxi_wu/32/1156_2.png) [@YuanXi\_Wu](https://uqworld.org/u/YuanXi_Wu)\
**Post date:** [March 5, 2023, 2:13pm UTC](https://uqworld.org/t/how-to-bulid-pce-model-for-given-data/1814/1 "2023-03-05T14:13:47Z")

</div>

Hi everyone,

I am wondering how to build PCE model based on given correlated non-Gaussian data.

For example, I have a data matrix with 30 dimensions and 17520 observations. I am assuming the underlying copula is the Gaussian copula. Then what should I do to build a PCE model based on this data? Should I do the Isoprobabilistic transformation myself? Or will the Uqlab automatically do this for me if I specify my input as following:

**iOpts.Marginals = uq\_KernelMarginals(solar\_power’);**  
**C = corr(solar\_power’,‘Type’, ‘Spearman’);**  
**iOpts.Copula.Type = ‘Gaussian’;**  
**iOpts.Copula.RankCorr = C;**  
**Input=uq\_createInput(iOpts);**

Any help or sample code will be appreciated.

Best regards,  
Yx Wu

---

<div class="post-metadata">

**Author:** ![142127](https://uqworld.org/user_avatar/uqworld.org/142127/32/367_2.png) [@142127](https://uqworld.org/u/142127)\
**Post date:** [March 9, 2023, 2:05am UTC](https://uqworld.org/t/how-to-bulid-pce-model-for-given-data/1814/2 "2023-03-09T02:05:13Z")

</div>

I suggest you start from the example: [https://www.uqlab.com/pce-truss-data-set](https://www.uqlab.com/pce-truss-data-set)

---

<div class="post-metadata">

**Author:** ![YuanXi\_Wu](https://uqworld.org/user_avatar/uqworld.org/yuanxi_wu/32/1156_2.png) [@YuanXi\_Wu](https://uqworld.org/u/YuanXi_Wu)\
**Post date:** [March 9, 2023, 2:13am UTC](https://uqworld.org/t/how-to-bulid-pce-model-for-given-data/1814/3 "2023-03-09T02:13:38Z")

</div>

Thank you for your reply. But I think this case focuses on useing existing data to replace experimental design, not using exsiting data to define an input object.

For the given input data, I am wondering how will uqlab deal with it inside this toolbox? In my case above, I used kernel estimation to infer the input distribution and I assumed the dependence structure is a Gaussian Copula. Then if I continued with uqlab to build model and PCE metamodel, what will uqlab do? Will it do an isoprobabilistic transformation automatically based on which type of polynomial basis I have assigned?

---

<div class="post-metadata">

**Author:** ![142127](https://uqworld.org/user_avatar/uqworld.org/142127/32/367_2.png) [@142127](https://uqworld.org/u/142127)\
**Post date:** [March 9, 2023, 9:24pm UTC](https://uqworld.org/t/how-to-bulid-pce-model-for-given-data/1814/5 "2023-03-09T21:24:31Z")

</div>

As far as I know, PCE automatically applies transformations. However, I have noticed that they have made many changes and updates. Therefore, I would suggest setting a breakpoint in the corresponding .m file that you are concerned about to double-check. If you are wondering how UQLab deals with it inside its toolbox, the best way to find out is to go through the code along with the manual.

---

<div class="post-metadata">

**Author:** ![YuanXi\_Wu](https://uqworld.org/user_avatar/uqworld.org/yuanxi_wu/32/1156_2.png) [@YuanXi\_Wu](https://uqworld.org/u/YuanXi_Wu)\
**Post date:** [March 10, 2023, 1:22am UTC](https://uqworld.org/t/how-to-bulid-pce-model-for-given-data/1814/6 "2023-03-10T01:22:18Z")

</div>

Got it! Thank you very much.
