One parameter of my problem in Sobol sensitivity analysis has lognormal distribution as below: [![enter image description here][1]][1]
When I define it in "problem" as "lognorm" the generated samples look very different, for example the peak density happens around 1 instead of 0.7: [![enter image description here][2]][2]
from SALib.sample import sobol
from SALib.sample import sobol
import matplotlib.pyplot as plt
problem = {
'num_vars': 2,
'names': ['x', 'z'],
'bounds': [[0.302, 0.529], [0, 1]],
'dists': ['lognorm', 'unif']
}
param_values = sobol.sample(problem, 1024)`
plt.hist(param_values[:, 0], bins=30, density=True, alpha=0.6, color='g')
plt.xlabel('x')
plt.ylabel('Density')
plt.title('Histogram of generated Samples for x (Lognormal Distribution)')
plt.grid(True)
plt.show()
the definition of lognorm distribution in SALib seems different, it does not even use the "shape" parameter of the lognormal distribution. Here is the screenshot: [![enter image description here][3]][3]
My question is: HOW can I correctly define my lognoraml parameter in the code. I appreciate your inputs.
[1]: .png
[2]: .png
[3]: .png
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744238120a4564570.html
评论列表(0条)