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

Distribution normalization and cp.Std magnitude #42

Closed
pvaezi opened this issue Mar 16, 2017 · 3 comments
Closed

Distribution normalization and cp.Std magnitude #42

pvaezi opened this issue Mar 16, 2017 · 3 comments

Comments

@pvaezi
Copy link

pvaezi commented Mar 16, 2017

Hi,

I am trying to use chaospy for a 5d uncertainty analysis with point collocation method. My problem is that when I don't normalize the distribution to the reference values (don't divide by norm param), the standard deviations become very big, cp.Std(U_hat, dist), after fitting the polynomials with simulation results. cp.E(U_hat, dist) function works properly though. Maybe I don't quite understand the procedure, but shouldn't the method be independent of distribution normalizations?

I have copied the code here:

norm = 11602.
Ln = cp.Normal(mu=0.565992, sigma=0.0807134)
LTe = cp.Lognormal(mu=-1.46212, sigma=0.229387)
Ti0 = cp.Normal(mu=0.6, sigma=0.1816)
Tg0 = cp.Normal(mu=5801.0/norm, sigma=2106.9232/norm)
Tgb = cp.Uniform(300./norm,1160./norm)
dist = cp.J(Ln,LTe,Ti0,Tg0,Tgb)
order = 2
P = cp.orth_ttr(order, dist)
nodes = dist.sample(11, "M")
#solve for nodes here...
U_hat = cp.fit_regression(P, nodes, solves, rule="T")
mean = cp.E(U_hat, dist)
std = cp.Std(U_hat, dist)

-Payam

@jonathf
Copy link
Owner

jonathf commented Mar 16, 2017

Preferable it should, but scaling is a problem.

The topic got discussed in issue #36. Take a look at the discussion, it should answer your question I think.

@pvaezi
Copy link
Author

pvaezi commented Mar 17, 2017

Thanks! That was a very useful link! I think the tikhonov regularization was also causing the problem. Switched it to least square method, and it seems fine now!

Thanks for the quick response!

@jonathf
Copy link
Owner

jonathf commented Mar 17, 2017

Great.

I consider the issue as resolved.

If you consider that not to be the case, or if there are other problems related to the same issue, feel free to re-open.

@jonathf jonathf closed this as completed Mar 17, 2017
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

2 participants