|
After some more checking the CDF & quantile are ok with both the 1.9 version and the current master, what version are you running ?
Here is the script I used:
import openturns as ot from openturns.viewer import View
x_dist = ot.Weibull(0.11838, 1.6767, -0.034709)
y_dist = ot.Normal(0.354331, 0.354331*0.0235) ls_dist = x_dist - y_dist
ls_dist.drawCDF()
View(ls_dist.drawCDF()).show()
for i in range(10):
print(ls_dist.computeCDF(-4.0/10.0+i/50.0)) 0.00042869973445390443 0.019440693720066658 0.09355158417553083 0.2053317087432412 0.3329714740337595 0.46134585220658253 0.5801972194337283 0.6835213642762484 0.7688041869759314 0.8361003299792358 for i in range(10):
print(ls_dist.computeQuantile(i/10.0)) [-0.452745]
[-0.358691] [-0.340872] [-0.325076] [-0.309661] [-0.293729] [-0.27641] [-0.256451] [-0.231363] [-0.1938] j
De : [email protected] <[email protected]> de la part de Julien Schueller | Phimeca <[email protected]>
Envoyé : jeudi 5 octobre 2017 08:49:27 À : [email protected] Objet : Re: [ot-users] Bug in distribution algebra Hello Phil,
This seems to be a bug of the RandomMixture simplifications, a workaround is to disable simplifications: ot.ResourceMap.SetAsBool("RandomMixture-SimplifyAtoms", False)
Thank you for reporting, I hope for this to get fixed for the 1.10 version.
j De : [email protected] <[email protected]> de la part de Phil Fernandes <[email protected]>
Envoyé : jeudi 5 octobre 2017 00:31:26 À : [email protected] Objet : [ot-users] Bug in distribution algebra
I’ve come across some odd behavior when subtracting a normal distribution from a Weibull, e.g.,
x_dist = ot.Weibull(0.11838, 1.6767, -0.034709)
y_dist = ot.Normal(0.354331, 0.354331*0.0235)
ls_dist = x_dist – y_dist
The PDF function is correct, but the CDF and Quantile functions are nonsensical. I have uploaded figures showing this behavior here:
https://imgur.com/a/GoVw3
Are there any caveats to be aware of when doing distribution algebra in OpenTurns? If I reverse the subtraction, i.e., y_dist – x_dist, then subtract the resulting CDF from 1, I get what appears to be the CDF I am looking for.
Thank you!
Phil Fernandes
|
_______________________________________________ OpenTURNS users mailing list [email protected] http://openturns.org/mailman/listinfo/users
