Some problems about PCK

Non-linear oscillator.zip (1.9 KB)
Hello everyone:
Thank you for read my problems. I recently used the PCK model, but there were some problems. The error proposed was: matrix dimensions are inconsistent,But I don’t know the reason for the error, Can you help me see what is causing it? thank you very much.

Hi youxiong,
I tried your code. From what I get, I assume the issue occurs when performing ‘uq_GeneralIsopTransform’. Probably because the standard deviations of inputs are too small. However I do not have a solution for now.

Best,
Charol

1 Like

Thank you for your answer,For the non-linear oscillator example, I did not convert the variable into a standard positive distribution later, but it reported an error. So two problems arise. Firstly, when using UQLlab, has it been considered that the non-normal distribution has been converted to the standard normal distribution. InputOpts.Marginals(1).Type =‘Gaussian’;
InputOpts.Marginals(1).Parameters = [1,0.05]; For non-standard positive variables, you don’t need to convert them to standard normal distribution again when you define the function? Secondly, pack method cannot solve the problem of Non-linear oscillator?Looking forward to your answer again,thank you.

Hi youxiong,
From what I know, UQLab will conduct transformation even if the inputs are independent. You may want to locate ‘uq_GeneralIsopTransform’ and see how UQLab utilize this function. For your problem, UQLab can handle arbitrary distribution. Details can be found in their manuals.

Best,
C.

2 Likes

Thank you for your answer @142127, you are right, UQLab automatically transforms the inputs to standard distributions! All of this happens inside, hidden from the users, the user doesn’t have to worry about this at all.

@youxiong, I just had a quick look at your code. There are several problems:

  • You create a uniform experimental design in [-6, 6]^d whereas your Gaussians are mostly centered around 1 with very small standard deviation. Is there a reason why you are not using uq_getSample(myInput, N, 'LHS') to get the experimental design? Have a look at this example to see what sampling strategies UQLab offers.
  • Your model function uq_xiaoche seems to transform standard Gaussian input to the non-standard Gaussian distribution you want to use before evaluating the function. This is not necessary when using UQLab: the input to your function should have the correct distribution, that’s why you specify an input in addition to a model!
  • Note that since you specify non-standard distributions, UQLab automatically transforms to standard distributions, so it can use standard polynomial families for PCE. So even though you wrote your model in terms of standard Gaussian RV, and drew an experimental design that is centered around 0, UQLab will still do the internal transformation.

I would suggest you to study this PC-Kriging example and implement your problem analogously.

Good luck! :slight_smile:

1 Like