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

Using Uncertainty Quantification on a Uniform Distribution for Varying Data #63

Open
DougRDrake opened this issue Sep 18, 2023 · 0 comments

Comments

@DougRDrake
Copy link

I'm wanting to create a distribution across an imported data set. I try importing the data and creating a chaospy distribution and each point and then passing in these distributions into the parameters functionality like this where eps and eps_double_prime are my imported data:
eps_dist = []
eps_double_prime_dist = []
parameters = []
for i in range(len(eps)):
eps_dist.append(cp.Uniform(0.9eps[i], 1.1eps[i]))
eps_double_prime_dist.append(cp.Uniform(0.8eps_double_prime[i], 1.2eps_double_prime[i]))
parameters_dict = {"eps":eps_dist[i],"eps_double_prime":eps_double_prime_dist[i]} #defining parameters for uncertainpy
parameters.append(parameters_dict)
parameters = un.Parameters(parameters)

Whenever I do this I'm given a "key error 1:" at line 216 in the parameters.py source code.
un.Parameters works if I pass in single inputs from the parameters dictionary ie. parameters = un.Parameters(parameters[i]), but I want to pass the whole list into Uncertainty Quantification. Is there a way I can do this or do I have to pass each of the parameters from the dictionary in one at a time and then stitch the results together using other data tools in python?

Thanks for the help and I can clarify anything if you ask.

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

No branches or pull requests

1 participant