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

Uploading my samples to ChaosPy #155

Open
ar-valdez opened this issue Jul 10, 2019 · 5 comments
Open

Uploading my samples to ChaosPy #155

ar-valdez opened this issue Jul 10, 2019 · 5 comments

Comments

@ar-valdez
Copy link

Dear @jonathf ,

I have one question. Is it possible to upload "manually" samples to ChaosPy.

Usually the general code starts like this:

x = cp.Uniform(a,b)
y = cp.Normal(a,b)
dist = cp.J(x,y)
samples = dist.sample(size=Ns)

and the variable samples its an array of samples for each variable x,y.

What I am trying to do is the following "Start my study, with samples that I have from a file" ....
Is it possible to do this?

Its difficult to characterize the distribution that the data has. Therein I thought that if can upload the samples itself, I will bypass this problem.

Thanks you.

@jonathf
Copy link
Owner

jonathf commented Jul 11, 2019

Depends a bit on what you want to do, but most likely sure. E.g. you can use chaospy.SampleDist to intepret data as a distribution, and off you go.

I'll note though, a lot of what makes chaospy do what it does is that it leverages analytical properties of probability distributions and smoothness of a solution to get exponentially better results than going in blind. You remove that component, you rely solely on the accuracy of the data, reducing it to at best the level of Monte Carlo sampling.

@ar-valdez
Copy link
Author

Dear @jonathf ,
Thanks for the rapid answer I see your point, Let me then ask you the following question:

So if I upload my own samples, I can be forced to loose the convergence that a PCE emulator has?

@jonathf
Copy link
Owner

jonathf commented Jul 14, 2019

I doubt you will loose convergence all together, just the fast speed of the convergence PCE usually offers. But I will note that I am not an expert on data driven PCE, so I might not be the best reference on this topic.

@flo2k, this is your topic more than mine. Do you have an overview of what to expect when using SampleDist compare to the traditional distributions?

@ar-valdez
Copy link
Author

Thanks @jonathf I will then look references to study data drive PCE.

@flo2k
Copy link
Collaborator

flo2k commented Jul 14, 2019

Hi @jonathf ,

Right now, I don't have a detailed numerical analysis. I planned this a little bit for my thesis. But it should be in the range of Monte Carlo.

Best,

Florian

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

3 participants