[ot-users] Collection of the marginals distribution
regis.lebrun at eads.net
Wed Jan 8 15:17:08 CET 2014
In your code, the kernelSmoothedCDF_Freq is a Graph instance, ie a
graphical object that has nothing to do with a probabilistic model (ie a
Distribution object). There is no hope to be able to convert a Graph
into a Distribution as you try when you write collectionMarginals =
In fact, the distribution you are looking at is precisely
kernelSmoothedDist, so you just have to write:
collectionMarginals = kernelSmoothedDist
If you use a very old version of OpenTURNS, you may have to explicitely
cast kernelSmoothedDist into a Distribution:
collectionMarginals = Distribution(kernelSmoothedDist)
Hope it helps
Le 08/01/2014 14:18, ndiaye a écrit :
> I have a question on Open turns since i'm a new user of this code and
> about uncertainty quantification study.
> Indeed, I want to create a collection of the marginals distribution from
> my numerical sample of data that i know from experiments.
> The thing is I drew the CDF of my samples using kernel smoothing and
> now i
> want to create the collection of the marginals distribution linked
> (because i want to create the input random vector after that).
> More precisely I have :
> My sample file:
> Sample1 = NumericalSample.ImportFromCSVFile("frequence.csv")
> My CDF drawing :
> kernel = KernelSmoothing()
> kernelSmoothedDist = kernel.build(Sample1,True)
> print "kernel bandwidth=" , kernel.getBandwidth()
> myBandwith3 = kernel.computeMixedBandwidth(Sample1)
> kernelSmoothedDist = kernel.build(Sample1, myBandwith3)
> kernelSmoothedCDF_Freq = kernelSmoothedDist.drawCDF()
> empiricalCDF =
> drawableEmpiricalCDF = empiricalCDF.getDrawable(0)
> And my marginal collection:
> collectionMarginals = DistributionCollection(#)
> collectionMarginals = Distribution(kernelSmoothedCDF_Freq)
> I want to use it to create my inputrandom vector but it doesn't work.
> Do you have some suggestions?
> Thank you.
More information about the users