I am new to using UQLab.
I am trying to create a PCE metamodel of a function that could take in a sampled input of distribution (a vector of 1 dimension with an arbitrary amount of samples). There are 200 output values to my model no matter how many inputs there are. The model function is not intended to calculate the output for each input sample, but use an input distribution for the calculation of 200 outputs.
I have sampled a uniform distribution by 100 samples LHS as input X [10x100], calculating 200 outputs Y [10x200].
I’ve used the following lines of code for PCE metamodelling:
MetaOpts.Type = ‘Metamodel’;
MetaOpts.MetaType = ‘PCE’;
MetaOpts.ExpDesign.X = X;
MetaOpts.ExpDesign.Y = Y;
MetaOpts.Degree = 1:5;
myPCE = uq_createModel(MetaOpts);
Update: if the input to the model is a vector, how are we to define the marginals? This is the error I received.
Index exceeds the number of array elements (10). Error in uq_GeneralIsopTransform (line 42) Y(:,ii) = Y_Marginals(ii).Parameters; Error in uq_getExpDesignSample (line 148) U = uq_GeneralIsopTransform(X, current_input.Marginals, current_input.Copula, PolyMarginals, PolyCopula); Error in uq_PCE_calculate_coefficients_regression (line 32) [current_model.ExpDesign.X, current_model.ExpDesign.U] = uq_getExpDesignSample(current_model); Error in uq_PCE_calculate_coefficients (line 47) uq_PCE_calculate_coefficients_regression(current_model); Error in uq_calculateMetamodel (line 18) success = uq_PCE_calculate_coefficients(current_model); Error in uq_initialize_uq_metamodel (line 358) success = uq_calculateMetamodel(current_model);
Any help or tips would be much appreciated.