How to use LHSExperiment ?

I want to use the method LHSExperiment from OpenTURNS version 0.13.1.

I use LHSExperiment(distribution, size) under this form but I have an error (wrong number of argument) and I don't understand my mistake.

Comments

1. souchaud@… -- 2011-04-22 15:23

Hi,

Don't forget that the better way to obtain support is to subscribe to the users mailing list ( http://trac.openturns.org/wiki/HowToUseMailingList ) and then send your question.

Mathieu

2. souchaud@… -- 2011-04-22 15:23

These commands work and are the same:

myRandomExp=LHSExperiment(Distribution(Uniform(-1.,1.)),100)
myRandomExp=LHSExperiment(100)
myRandomExp=LHSExperiment()

You must declare a 1D-distribution

3. souchaud@… -- 2011-04-22 15:23

Hi,

You forgot to cast your ComposedDistribution into a Distribution object. The conversion is automatic in C++, but must be made explicitely in python: myRandomExp=LHSExperiment(Distribution(inputDistribution),1000)

By the way, the LHSExperiment class is by no way limited to 1D distributions, but the distribution should have an independent copula (which is always the case for 1D distributions). If the copula is not the independent one, it is silently replaced by the independent copula for the sample generation.

Régis