# PCE with custom continuous marginals

**URL:** <https://uqworld.org/t/pce-with-custom-continuous-marginals/1721>\
**Category:** Community Q&A and How To\
**Tags:** pce, input\
**Created:** [October 3, 2022, 8:26am UTC](https://uqworld.org/t/pce-with-custom-continuous-marginals/1721 "2022-10-03T08:26:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Irma](https://uqworld.org/letter_avatar_proxy/v4/letter/i/57b2e6/32.png) [@Irma](https://uqworld.org/u/Irma)\
**Post date:** [October 3, 2022, 8:26am UTC](https://uqworld.org/t/pce-with-custom-continuous-marginals/1721/1 "2022-10-03T08:26:15Z")

</div>

Hello all,  
I am building a sparse PCE surrogate model from existing data (from a FEM) using a custom marginal (continuous distribution) for one of the inputs. However, PCE doesn’t seem to work correctly. The custom marginal produces the expected sampling (so I am confident of its correctness). Still, the PCE does not correctly predict the system behaviour (I tried different strategies to calculate the PCE coefficients). I read on the blog that PCE does not support discrete custom marginals. Is PCE supporting the continuous custom marginals?  
Best regards,  
Irma

---

<div class="post-metadata">

**Author:** ![styfen.schaer](https://uqworld.org/user_avatar/uqworld.org/styfen.schaer/32/849_2.png) [@styfen.schaer](https://uqworld.org/u/styfen.schaer)\
**Post date:** [October 6, 2022, 4:20pm UTC](https://uqworld.org/t/pce-with-custom-continuous-marginals/1721/2 "2022-10-06T16:20:55Z")

</div>

Dear @Irma

PCE does indeed support arbitrary distributions, as documented here:

> **[UQLab - Polynomial chaos expansions (PCE) user manuals](https://www.uqlab.com/pce-user-manual)**
>
> User manual for the polynomial chaos expansions (PCE) module of UQLab.

However, I am unable to narrow down the problem with the limited information provided. Can you give me

- more information about your problem/input variables;
- the code that is giving incorrect results;
- ideally also the data that leads to wrong results.

Best regards  
Styfen
