Hi @Abdollahi,
I tried to reproduce your problem but I couldn’t. Here are a couple of remarks based on the description of your problem:
- The configuration option for the Kriging trend is typically set via
MetaOpts.Trend
and notMetaOpts.Kriging.Trend
, unless you are creating a custom Kriging model, in which none of the Kriging parameters are estimated. - If you intend to use
MetaOpts.Trend.Type= 'quadratic'
trend type, thenMetaOpts.Trend.Degree
wouldn’t be relevant because quadratic means polynomial degree 2. It won’t make much sense to have a quadratic trend with a degree other than 2. See, for instance, Table 2 page 25 of the Kriging User Manual. - With degree 2 you should get 15 beta coefficients because the trend equation for 4-parameter model would be (I explicitly write each term below. Note: I don’t keep the ordering of the coefficients as in UQLab here, but you should get the idea):
-
If you set the trend type to polynomial and the degree to 1, you should get five beta coefficients. So I am not sure why you get only one (see below).
-
Finally, if you use built-in
'polynomial'
trend type, you cannot exclude the term x_1^2, x_2^2, x_3^2, and x_4^2 from the trend equation. Creating a trend function you wrote should be possible using a custom trend, but I just need to confirm that you explicitly don’t want those terms.
BTW, we could not speak about specific values of beta because it will depend on your particular case, but we can verify its size nevertheless.
As a verification example, I created two Kriging models for the 4-dimensional Rosenbrock function, one with a quadratic trend and the other with a polynomial of degree 1.
%% 1 - INITIALIZE UQLAB
%
uqlab
clearvars
%% 2 - COMPUTATIONAL MODEL
%
ModelOpts.Name = 'rosenbrockFunctionModel';
ModelOpts.mFile = 'uq_rosenbrock';
myModel = uq_createModel(ModelOpts);
%% 3 - PROBABILISTIC INPUT MODEL
%
M = 4;
for k = 1:M
InputOpts.Marginals(k).Type = 'Uniform';
InputOpts.Marginals(k).Parameters = [-5 10];
end
myInput = uq_createInput(InputOpts);
%% 4 - KRIGING METAMODEL
MetaOpts.Type = 'Metamodel';
MetaOpts.MetaType = 'Kriging';
MetaOpts.Input = myInput;
MetaOpts.FullModel = myModel;
MetaOpts.ExpDesign.NSamples = 50;
%% Quadratic trend
MetaOpts.Trend.Type = 'quadratic';
myKriging1 = uq_createModel(MetaOpts);
size(myKriging1.Kriging.beta) % Give: 15-row vector
%% Polynomial trend
MetaOpts.Trend.Type = 'polynomial';
MetaOpts.Trend.Degree = 1;
myKriging2 = uq_createModel(MetaOpts);
size(myKriging2.Kriging.beta) % Give: 5-row vector
Let know if you can confirm this!