Providing formula with kriging meta-model

Hi UQWorld!

According to the suggestion by @damarginal regarding to estimation trend with Kriging metamodel, I added two options to “example/ metamodeling/kriging/uq_Example_Kriging_05_TrussDataSet” as follows:

MetaOpts.Trend.Type = ‘polynomial’;
MetaOpts.Trend.Degree=1;

I achieved 11 betas and 10 thetas.

Beta: [-0.09401 -0.00044 -0.00234 -0.00336 -0.00378 -0.00194 -0.00082 0.00164 0.00860 0.00106 0.00888 ]

theta: [ 7.33454 9.68573 7.06032 9.66927 8.72347 9.29973 9.82737 8.91830 9.11504 7.66206 ].

The betas are substituted in this formula according to Table 1in User_Manual_Kriging:

Y=β0+ β1x1+ β2x2+ β3x3+ β4x4+ β5x5+ β6x6+ β7x7+ β8x8+ β9x9+ β10x10

And then, I selected the first row data of “Examples\ SimpleDataSets\ Truss_Matlab_FEM \ Truss_Experimental_Design.mat” (X data) and used as x1 ,x2,…,x10. The y value in the mentioned equation is very different the Y value in the first row in : Truss_Experimental_Design.mat (Y data). What is the reason for this difference?
It should be mentioned I use:

uq_evalModel(x)

and then evaluate the metamodel, the Y value is achieved is more accurate.
The aim is to provide the formula by kriging meta-model. Could anyone help me to find my problem?
Thank you in advance for your time.

Best Regards,
Azam Abdollahi

1 Like

Hi @Abdollahi

I think what is not clear is how to read the resulting beta coefficients.
The beta coefficients provided by UQLab for polynomial trend of degree 1 are not in this order:
\beta_0, \beta_1, \beta_2, \ldots, \beta_M but instead \beta_0, \beta_M, \beta_{M-1}, \ldots, \beta_1 (thanks to @nluethen for helping me with clarifying this) .

How about polynomial of a higher degree? Then you need to check the indices stored in myKriging.Internal.Kriging.Trend.Indices. It is stored in a sparse representation, so for a more human-readable format, use the MATLAB function full on it:

full(myKriging.Internal.Kriging.Trend.Indices)

Each of the rows indicates the meaning of the coefficients given in myKriging.Kriging.beta.
Here are some examples in the case of a 10-dimensional model with polynomial trend of degree 2 (quadratic trend):

  • the first row is [0 0 0 0 0 0 0 0 0 0], so the first beta coefficient is \beta_0 (the constant term in the trend)
  • the second row is [0 0 0 0 0 0 0 0 0 1], so the second beta coefficient is \beta_{10}
  • the 13th row is [0 0 0 0 0 0 0 0 2 0], so the 13th beta coefficient is \beta_{9,9} (i.e., the coefficient for x^2_9)
  • the 30th row is [0 0 0 0 0 1 0 1 0 0], so the 30th beta coefficient is \beta_{6,8} (i.e., the coefficient for x_6 x_8)
  • so on and so forth

Admittedly, this may not be the most intuitive thing if you want to extract and use the coefficients manually. We may think of a way to document this better.

Moving on to your second point, about using uq_evalModel. You should be aware that a Kriging predictor is not simply its trend, but also includes another term based on the conditioning of the Gaussian process. uq_evalModel will evaluate the Kriging metamodel based on the formula given by Eq. (1.6) of the Kriging User Manual. So it is expected that the results of uq_evalModel would differ from simply computing the trend term using the beta coefficients.

I hope this helps!

2 Likes