# Whether PCE in UQLab can use weighted least square method to calculate coefficient？

**URL:** <https://uqworld.org/t/whether-pce-in-uqlab-can-use-weighted-least-square-method-to-calculate-coefficient/1997>\
**Category:** UQ Discussion Forum\
**Tags:** pce\
**Created:** [October 6, 2023, 7:05am UTC](https://uqworld.org/t/whether-pce-in-uqlab-can-use-weighted-least-square-method-to-calculate-coefficient/1997 "2023-10-06T07:05:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wang](https://uqworld.org/letter_avatar_proxy/v4/letter/w/edb3f5/32.png) [@Wang](https://uqworld.org/u/Wang)\
**Post date:** [October 6, 2023, 7:05am UTC](https://uqworld.org/t/whether-pce-in-uqlab-can-use-weighted-least-square-method-to-calculate-coefficient/1997/1 "2023-10-06T07:05:00Z")

</div>

I recently tried to do some work on PCE, when using the toolbox do not know how to choose the weighted least square solution coefficient, hope to be solved. In addition, there are some problems in the PCE program I wrote. No matter which orthogonal polynomial is selected as the basis function, the output response does not change under the same input conditions. The diagram is the result obtained using the Hermite and Legendre polynomials as the basis function.

 ![image](https://uqworld.org/uploads/default/original/2X/d/d4f81f5e8f10ace0242606eb30ac314a223bba63.png)

---

<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 9, 2023, 12:32pm UTC](https://uqworld.org/t/whether-pce-in-uqlab-can-use-weighted-least-square-method-to-calculate-coefficient/1997/2 "2023-10-09T12:32:55Z")

</div>

Dear @Wang

As far as I know, there is no option for weighted least squares in QULab. Regarding your other problem, it would be very helpful if you could provide a minimal reproducible example.

Best regards  
Styfen
