Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about obtain the skewness and kurtosis of PCE #417

Open
zhangshengwangBJUT opened this issue Mar 13, 2024 · 1 comment
Open

Question about obtain the skewness and kurtosis of PCE #417

zhangshengwangBJUT opened this issue Mar 13, 2024 · 1 comment
Labels

Comments

@zhangshengwangBJUT
Copy link

Hi Jonathan,
I am a new user of chaospy, and my study is about using PCE to build a surrogate model of limit state function and then performing reliability analysis. Thanks for providing and maintaining such excellent UQ software.

Recently, I am interested in the higher order moments of PCE. I am very happy to find that chaospy can obtain the skewness and kurtosis of polynomials directly. I would like to know how to implement it in your code (only 13 lines code in Source code for chaospy.descriptives.skewness? ) and do you have some references equations or papers.

I have learned that one of the great advantages of PCE is that once the coefficients have been solved for, statistical information about PCE such as the first four orders of moments can be obtained from the coefficients. Among them, the mean and standard deviation are easy to obtain, as talked in #355 "Need to output non intrusive polynomial chaos coefficients". However, As far as I know, it is very difficult to obtain the exact higher-order moments of the PCE through the coefficience of PCE. I would like to know that if it can be implement in chaospy to obtain the exact skewness and kurtosis of PCE through the coefficience of PCE.

Thanks very much!
Best regards,
SW

@jonathf
Copy link
Owner

jonathf commented Apr 9, 2024

Chasopy calculates skewness and kurtosis using the expected value defintition. E.g. for skewness:

$$E( (\frac{X - \mu}{\sigma})^3 )$$

A bit of care has to be done to get the math right, but numerically this is directly solvable as there are straight forward rules for taking expectations of polynomials.

As for the exactness, it is not as good as what you get with mean (first coefficient) and variance (sum of the squared rest), but you do okay in my experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants