-
Notifications
You must be signed in to change notification settings - Fork 86
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
Polynomial representations and random variables #13
Comments
I have thought about creating a variable as you suggest, but struggled with generalising the idea. For your use case, your output is a univariate variable, the job is more doable. But I need a couple of components that likely have to be estimated numerically:
The easy solution, though perhaps not very elegant is to use kernel density estimation on samples generated from your polynomial. This is already implemented:
If you have a better approach, let me know, and we can discuss making a PR. |
I see that constructing the PDF in the general case is going to be quite difficult, yes. I suppose for now, I can do with the KDE approach though. It's still less difficult than estimating the same from the model. Thanks for the comment. Closing for now. |
Hi, here is this function called qoi_dist = cp.QoI_Dist(u_hat, dist) Now you can use the Best, Florian |
Is
|
Hm... It seems stuck inside numpy array. You can extract it by doing
I'll also make a bugfix in the code for that. |
Should be solved in #24. Feel free to re-open the issue if that is not the case. |
Hi,
Many thanks for contributing this package. I've done a few basic examples and I like your API a lot. At the moment I am trying to construct a random variable based on the polynomial representation. Is there a way to do it in ChaosPy already?
For instance, if I have a code which looks like this
I would like to make a random variable based on u_hat. If I just use algebraic operations on a and I get an expected behaviour of a transformed RV, but how to perform this with the u_hat representation?
Obviously, I can print u_hat and see it in terms of q0 and q1, but I would like to make an actual substitution and see in terms of a and I and then for instance plot a pdf.
Please let me know if it's there already. Otherwise, I am happy to work on a pull request to implement it.
The text was updated successfully, but these errors were encountered: