Input variables - PCE

Dear users,

I am writing to kindly ask if it is possible to generate a PCE by using a DOE composed by continuous and discrete random variables. Specifically, I am working with 10 initial variables: 9 variables are continuous and 1 variable is discrete (it is the vector of interger numbers from 1 to 20). Considering the initialization of all variables in matlab, I defined the first 9 variables by using the standard approach described in UQ manuals (name, type, parameters) and I sampled the real numerical values of these variables by employing a LHS method. The problem is that I would like to generate a discrete uniform distribution for the last variable in order to sample the integer numerical values of that coefficient though the application of the LHS method; is it possible? My doubt is if it is possible generate a PCE where some initial variables are defined in the set of real numbers and some initial variables are defined in the set of natural numbers.

Dear Simone

Thanks for your interesting question. For now, there is no support for discrete variables in UQLab. We’re working on it for some time, but it’s not yet ready to be released.

In your case, it’s quite easy to handle though. As you have a discrete variable that has 20 different (equiprobable) values, it is reasonable to define a continuous random variable and use a rounding to get a discrete uniform distribution.

The trick is the following:

X \sim \mathcal{U}(0,20), \quad Y = \lfloor X \rfloor + 1

where \lfloor x \rfloor is the largest integer smaller than x (‘floor’ function). This way you should get uniform integers between 1 and 20.

In UQLab INPUT object, you define the tenth variable as \mathcal{U}(0,20). In your MODEL function, you can use:

X(:,10)  = floor(X(:,10)) + 1

before running the model.

I hope it answers your question.
Best regards
Bruno