DiceKriging
.krigingsm
is a kriging adapter. It makes the use of the universal distirbution easier
aggregation
An R6Class
generator object
It construct a kriging model from the package DiceKriging and it inherits form the sm
.
The inheritance of the class sm
is required when one want to use the universal distribution
numsm
: number of sub models
model_name
: "aggregation"
aggweights
: aggregation weights
fit
: fitness function used to tune the wieghts
krigingsm$new(x=NULL,y=NULL,parameters = NULL, type= "UK")
Creates a new krigingsm
object.
train()
train the surrogate model.
predict(newdata)
it predicts the new data.
library(UP) d <- 2; n <- 16 X <- expand.grid(x1=s <- seq(0,1, length=5), x2=s) Xtest <- expand.grid(x1=seq(0,1,length=5), x2=seq(0,1,length=4)) Y <- apply(X, 1, branin) sm = krigingsm$new() sm$setDOE(X,Y) sm$train() sm$predict(Xtest)#> $trend #> [,1] #> 1 165.159 #> 2 165.159 #> 3 165.159 #> 4 165.159 #> 5 165.159 #> 6 165.159 #> 7 165.159 #> 8 165.159 #> 9 165.159 #> 10 165.159 #> 11 165.159 #> 12 165.159 #> 13 165.159 #> 14 165.159 #> 15 165.159 #> 16 165.159 #> 17 165.159 #> 18 165.159 #> 19 165.159 #> 20 165.159 #> #> $mean #> [1] 305.956302 80.060129 10.218600 20.597105 9.503736 158.604546 #> [7] 22.841246 7.158665 35.777271 7.079011 63.869991 16.075489 #> [13] 53.298304 99.758901 53.839230 17.235277 59.440237 150.837655 #> [19] 215.592921 152.014126 #> #> $c #> [,1] [,2] [,3] [,4] [,5] [,6] [,7] #> [1,] 8772.3606 6675.7918 3533.054 1543.6729 601.8137 8025.1909 6107.193 #> [2,] 6675.7918 8772.3606 6675.792 3533.0543 1543.6729 6107.1935 8025.191 #> [3,] 3533.0543 6675.7918 8772.361 6675.7918 3533.0543 3232.1329 6107.193 #> [4,] 1543.6729 3533.0543 6675.792 8772.3606 6675.7918 1412.1934 3232.133 #> [5,] 601.8137 1543.6729 3533.054 6675.7918 8772.3606 550.5553 1412.193 #> [6,] 8335.0379 6342.9880 3356.923 1466.7172 571.8118 8721.1187 6636.797 #> [7,] 6342.9880 8335.0379 6342.988 3356.9233 1466.7172 6636.7966 8721.119 #> [8,] 3356.9233 6342.9880 8335.038 6342.9880 3356.9233 3512.4168 6636.797 #> [9,] 1466.7172 3356.9233 6342.988 8335.0379 6342.9880 1534.6559 3512.417 #> [10,] 571.8118 1466.7172 3356.923 6342.9880 8335.0379 598.2983 1534.656 #> [11,] 7247.1070 5515.0694 2918.761 1275.2739 497.1761 8571.7354 6523.115 #> [12,] 5515.0694 7247.1070 5515.069 2918.7609 1275.2739 6523.1155 8571.735 #> [13,] 2918.7609 5515.0694 7247.107 5515.0694 2918.7609 3452.2528 6523.115 #> [14,] 1275.2739 2918.7609 5515.069 7247.1070 5515.0694 1508.3688 3452.253 #> [15,] 497.1761 1275.2739 2918.761 5515.0694 7247.1070 588.0501 1508.369 #> [16,] 5891.1596 4483.1896 2372.655 1036.6678 404.1535 7657.5199 5827.395 #> [17,] 4483.1896 5891.1596 4483.190 2372.6552 1036.6678 5827.3949 7657.520 #> [18,] 2372.6552 4483.1896 5891.160 4483.1896 2372.6552 3084.0540 5827.395 #> [19,] 1036.6678 2372.6552 4483.190 5891.1596 4483.1896 1347.4943 3084.054 #> [20,] 404.1535 1036.6678 2372.655 4483.1896 5891.1596 525.3318 1347.494 #> [21,] 4552.6895 3464.6099 1833.589 801.1371 312.3299 6352.4082 4834.201 #> [22,] 3464.6099 4552.6895 3464.610 1833.5885 801.1371 4834.2011 6352.408 #> [23,] 1833.5885 3464.6099 4552.690 3464.6099 1833.5885 2558.4223 4834.201 #> [24,] 801.1371 1833.5885 3464.610 4552.6895 3464.6099 1117.8337 2558.422 #> [25,] 312.3299 801.1371 1833.589 3464.6099 4552.6895 435.7967 1117.834 #> [,8] [,9] [,10] [,11] [,12] [,13] [,14] #> [1,] 3232.133 1412.193 550.5553 6352.4082 4834.201 2558.422 1117.834 #> [2,] 6107.193 3232.133 1412.1934 4834.2011 6352.408 4834.201 2558.422 #> [3,] 8025.191 6107.193 3232.1329 2558.4223 4834.201 6352.408 4834.201 #> [4,] 6107.193 8025.191 6107.1935 1117.8337 2558.422 4834.201 6352.408 #> [5,] 3232.133 6107.193 8025.1909 435.7967 1117.834 2558.422 4834.201 #> [6,] 3512.417 1534.656 598.2983 7657.5199 5827.395 3084.054 1347.494 #> [7,] 6636.797 3512.417 1534.6559 5827.3949 7657.520 5827.395 3084.054 #> [8,] 8721.119 6636.797 3512.4168 3084.0540 5827.395 7657.520 5827.395 #> [9,] 6636.797 8721.119 6636.7966 1347.4943 3084.054 5827.395 7657.520 #> [10,] 3512.417 6636.797 8721.1187 525.3318 1347.494 3084.054 5827.395 #> [11,] 3452.253 1508.369 588.0501 8571.7354 6523.115 3452.253 1508.369 #> [12,] 6523.115 3452.253 1508.3688 6523.1155 8571.735 6523.115 3452.253 #> [13,] 8571.735 6523.115 3452.2528 3452.2528 6523.115 8571.735 6523.115 #> [14,] 6523.115 8571.735 6523.1155 1508.3688 3452.253 6523.115 8571.735 #> [15,] 3452.253 6523.115 8571.7354 588.0501 1508.369 3452.253 6523.115 #> [16,] 3084.054 1347.494 525.3318 8721.1187 6636.797 3512.417 1534.656 #> [17,] 5827.395 3084.054 1347.4943 6636.7966 8721.119 6636.797 3512.417 #> [18,] 7657.520 5827.395 3084.0540 3512.4168 6636.797 8721.119 6636.797 #> [19,] 5827.395 7657.520 5827.3949 1534.6559 3512.417 6636.797 8721.119 #> [20,] 3084.054 5827.395 7657.5199 598.2983 1534.656 3512.417 6636.797 #> [21,] 2558.422 1117.834 435.7967 8025.1909 6107.193 3232.133 1412.193 #> [22,] 4834.201 2558.422 1117.8337 6107.1935 8025.191 6107.193 3232.133 #> [23,] 6352.408 4834.201 2558.4223 3232.1329 6107.193 8025.191 6107.193 #> [24,] 4834.201 6352.408 4834.2011 1412.1934 3232.133 6107.193 8025.191 #> [25,] 2558.422 4834.201 6352.4082 550.5553 1412.193 3232.133 6107.193 #> [,15] [,16] [,17] [,18] [,19] [,20] #> [1,] 435.7967 4552.6895 3464.6099 1833.589 801.1371 312.3299 #> [2,] 1117.8337 3464.6099 4552.6895 3464.610 1833.5885 801.1371 #> [3,] 2558.4223 1833.5885 3464.6099 4552.690 3464.6099 1833.5885 #> [4,] 4834.2011 801.1371 1833.5885 3464.610 4552.6895 3464.6099 #> [5,] 6352.4082 312.3299 801.1371 1833.589 3464.6099 4552.6895 #> [6,] 525.3318 5891.1596 4483.1896 2372.655 1036.6678 404.1535 #> [7,] 1347.4943 4483.1896 5891.1596 4483.190 2372.6552 1036.6678 #> [8,] 3084.0540 2372.6552 4483.1896 5891.160 4483.1896 2372.6552 #> [9,] 5827.3949 1036.6678 2372.6552 4483.190 5891.1596 4483.1896 #> [10,] 7657.5199 404.1535 1036.6678 2372.655 4483.1896 5891.1596 #> [11,] 588.0501 7247.1070 5515.0694 2918.761 1275.2739 497.1761 #> [12,] 1508.3688 5515.0694 7247.1070 5515.069 2918.7609 1275.2739 #> [13,] 3452.2528 2918.7609 5515.0694 7247.107 5515.0694 2918.7609 #> [14,] 6523.1155 1275.2739 2918.7609 5515.069 7247.1070 5515.0694 #> [15,] 8571.7354 497.1761 1275.2739 2918.761 5515.0694 7247.1070 #> [16,] 598.2983 8335.0379 6342.9880 3356.923 1466.7172 571.8118 #> [17,] 1534.6559 6342.9880 8335.0379 6342.988 3356.9233 1466.7172 #> [18,] 3512.4168 3356.9233 6342.9880 8335.038 6342.9880 3356.9233 #> [19,] 6636.7966 1466.7172 3356.9233 6342.988 8335.0379 6342.9880 #> [20,] 8721.1187 571.8118 1466.7172 3356.923 6342.9880 8335.0379 #> [21,] 550.5553 8772.3606 6675.7918 3533.054 1543.6729 601.8137 #> [22,] 1412.1934 6675.7918 8772.3606 6675.792 3533.0543 1543.6729 #> [23,] 3232.1329 3533.0543 6675.7918 8772.361 6675.7918 3533.0543 #> [24,] 6107.1935 1543.6729 3533.0543 6675.792 8772.3606 6675.7918 #> [25,] 8025.1909 601.8137 1543.6729 3533.054 6675.7918 8772.3606 #> #> $Tinv.c #> [,1] [,2] [,3] [,4] [,5] #> [1,] 9.366088e+01 7.127620e+01 3.772177e+01 1.648151e+01 6.425454e+00 #> [2,] 1.496806e-14 6.076235e+01 6.561838e+01 3.881210e+01 1.786782e+01 #> [3,] -1.317494e-15 -1.648551e-14 5.516935e+01 6.357321e+01 3.839482e+01 #> [4,] -7.809650e-16 1.091819e-14 -8.368625e-15 5.433956e+01 6.322320e+01 #> [5,] -9.921363e-16 -1.057136e-15 9.757115e-15 0.000000e+00 5.422619e+01 #> [6,] 6.228672e-14 -9.748129e-28 3.472525e-28 2.803501e-16 2.212778e-16 #> [7,] -7.067115e-14 -2.400264e-14 -1.778966e-27 -3.288597e-16 -2.595660e-16 #> [8,] 1.766777e-14 5.234894e-14 -2.643601e-14 1.994575e-16 1.574300e-16 #> [9,] -1.166753e-15 -1.859875e-14 2.959013e-14 -8.349367e-17 -6.590082e-17 #> [10,] 5.091841e-15 -7.472057e-15 -2.922952e-14 3.126224e-17 2.467501e-17 #> [11,] -1.214378e-13 3.455142e-26 -1.512594e-26 -7.744685e-16 -6.112812e-16 #> [12,] 1.494084e-13 2.728642e-14 8.559670e-26 9.084766e-16 7.170526e-16 #> [13,] -5.695769e-14 -7.017058e-14 3.005269e-14 -5.510023e-16 -4.349013e-16 #> [14,] 1.589988e-14 6.386521e-15 -3.904963e-14 2.306517e-16 1.820514e-16 #> [15,] -1.754132e-14 2.231596e-14 3.953750e-14 -8.636212e-17 -6.816486e-17 #> [16,] 1.181709e-13 -1.781311e-25 8.228555e-26 8.038805e-16 6.344958e-16 #> [17,] -2.221937e-13 2.165715e-14 -4.661530e-25 -9.429777e-16 -7.442840e-16 #> [18,] 1.636417e-13 -5.922423e-15 -3.267404e-16 5.719277e-16 4.514175e-16 #> [19,] -7.865805e-14 4.001019e-14 -1.988209e-15 2.430929e-14 -1.889651e-16 #> [20,] 4.832132e-14 -3.654404e-14 -9.916787e-15 -2.853208e-14 -2.452926e-14 #> [21,] -5.746391e-14 -1.966903e-26 -5.862637e-26 -4.468183e-16 -3.526698e-16 #> [22,] 2.201206e-13 -6.774767e-14 3.270439e-25 5.241323e-16 4.136930e-16 #> [23,] -2.348415e-13 1.175398e-13 -2.166559e-14 -3.178927e-16 -2.509099e-16 #> [24,] 1.287002e-13 -1.167658e-13 7.249898e-14 -5.362577e-14 1.050319e-16 #> [25,] -6.675547e-14 7.874617e-14 -6.580724e-14 6.262848e-14 5.383190e-14 #> [,6] [,7] [,8] [,9] [,10] #> [1,] 8.568349e+01 6.520538e+01 3.450889e+01 1.507773e+01 5.87817758 #> [2,] 1.152541e-12 5.558703e+01 6.002945e+01 3.550635e+01 16.34596323 #> [3,] -6.949254e-13 1.772192e-12 5.047040e+01 5.815848e+01 35.12461467 #> [4,] 2.952616e-13 -1.010517e-12 1.924784e-12 4.971128e+01 57.83827793 #> [5,] -1.166680e-13 4.202560e-13 -1.082659e-12 1.970738e-12 49.60757507 #> [6,] 3.752984e+01 2.856032e+01 1.511509e+01 6.604129e+00 2.57467453 #> [7,] 6.474713e-12 2.434743e+01 2.629324e+01 1.555198e+01 7.15962297 #> [8,] -3.943802e-12 1.000933e-11 2.210632e+01 2.547374e+01 15.38477692 #> [9,] 1.626602e-12 -5.664529e-12 1.078956e-11 2.177382e+01 25.33348797 #> [10,] -5.953900e-13 2.275765e-12 -5.996972e-12 1.097349e-11 21.72839426 #> [11,] 4.424361e+00 3.366952e+00 1.781904e+00 7.785551e-01 0.30352617 #> [12,] -8.855331e-12 2.870298e+00 3.099687e+00 1.833410e+00 0.84404181 #> [13,] 5.369250e-12 -1.352631e-11 2.606095e+00 3.003077e+00 1.81369815 #> [14,] -2.200730e-12 7.656163e-12 -1.472791e-11 2.566897e+00 2.98654316 #> [15,] 8.130289e-13 -3.087755e-12 8.099374e-12 -1.488816e-11 2.56154176 #> [16,] -9.788326e-01 -7.448944e-01 -3.942233e-01 -1.722452e-01 -0.06715123 #> [17,] 3.207143e-12 -6.350161e-01 -6.857656e-01 -4.056181e-01 -0.18673331 #> [18,] -1.903074e-12 4.750509e-12 -5.765646e-01 -6.643919e-01 -0.40125721 #> [19,] 7.525189e-13 -2.675570e-12 5.376836e-12 -5.678927e-01 -0.66073397 #> [20,] -2.795348e-13 1.077089e-12 -2.847279e-12 5.478405e-12 -0.56670792 #> [21,] 3.761038e-01 2.862161e-01 1.514752e-01 6.618300e-02 0.02580199 #> [22,] 3.109860e-12 2.439967e-01 2.634966e-01 1.558535e-01 0.07174986 #> [23,] -1.863339e-12 4.817864e-12 2.215375e-01 2.552840e-01 0.15417790 #> [24,] 7.630485e-13 -2.640395e-12 5.124691e-12 2.182054e-01 0.25387849 #> [25,] -2.781310e-13 9.926007e-13 -2.989149e-12 4.836591e-12 0.21775019 #> [,11] [,12] [,13] [,14] [,15] #> [1,] 6.782349e+01 5.161388e+01 2.731580e+01 1.193490e+01 4.6529215 #> [2,] 9.130518e-13 4.400039e+01 4.751683e+01 2.810536e+01 12.9387865 #> [3,] -5.419614e-13 1.409511e-12 3.995027e+01 4.603584e+01 27.8031880 #> [4,] 2.245958e-13 -7.954226e-13 1.497984e-12 3.934939e+01 45.7823817 #> [5,] -8.673267e-14 3.256369e-13 -8.282435e-13 1.559818e-12 39.2672987 #> [6,] 5.553426e+01 4.226173e+01 2.236634e+01 9.772367e+00 3.8098384 #> [7,] 1.201332e-11 3.602777e+01 3.890705e+01 2.301283e+01 10.5943513 #> [8,] -7.355796e-12 1.866382e-11 3.271151e+01 3.769441e+01 22.7654071 #> [9,] 3.088278e-12 -1.064983e-11 2.021700e-11 3.221950e+01 37.4868723 #> [10,] -1.165764e-12 4.339001e-12 -1.141443e-11 2.062908e-11 32.1522856 #> [11,] 3.161648e+01 2.406023e+01 1.273349e+01 5.563554e+00 2.1689977 #> [12,] 2.523196e-11 2.051114e+01 2.215036e+01 1.310154e+01 6.0315220 #> [13,] -1.530203e-11 3.918958e-11 1.862315e+01 2.145999e+01 12.9606853 #> [14,] 6.366609e-12 -2.214787e-11 4.189605e-11 1.834304e+01 21.3418346 #> [15,] -2.302856e-12 8.890727e-12 -2.286132e-11 4.313960e-11 18.3047750 #> [16,] 9.251915e+00 7.040734e+00 3.726194e+00 1.628060e+00 0.6347127 #> [17,] -6.120997e-12 6.002166e+00 6.481849e+00 3.833898e+00 1.7650012 #> [18,] 3.575562e-12 -9.797217e-12 5.449683e+00 6.279825e+00 3.7926787 #> [19,] -1.317502e-12 5.335576e-12 -1.039867e-11 5.367715e+00 6.2452502 #> [20,] 3.484749e-13 -2.040661e-12 5.548860e-12 -1.039428e-11 5.3565170 #> [21,] -1.242412e+00 -9.454794e-01 -5.003796e-01 -2.186274e-01 -0.0852337 #> [22,] -6.939638e-12 -8.060131e-01 -8.704284e-01 -5.148429e-01 -0.2370168 #> [23,] 4.396803e-12 -1.024133e-11 -7.318218e-01 -8.432992e-01 -0.5093076 #> [24,] -2.049471e-12 6.105340e-12 -1.131325e-11 -7.208147e-01 -0.8386562 #> [25,] 9.393308e-13 -2.546674e-12 6.438475e-12 -1.154675e-11 -0.7193109 #> [,16] [,17] [,18] [,19] [,20] #> [1,] 4.860823e+01 3.699100e+01 1.957689e+01 8.553593e+00 3.334689 #> [2,] 6.585947e-13 3.153451e+01 3.405470e+01 2.014275e+01 9.273062 #> [3,] -4.000440e-13 1.022102e-12 2.863185e+01 3.299330e+01 19.926188 #> [4,] 1.670840e-13 -5.848727e-13 1.087921e-12 2.820120e+01 32.811646 #> [5,] -6.357311e-14 2.412457e-13 -6.143076e-13 1.115354e-12 28.142370 #> [6,] 5.360429e+01 4.079302e+01 2.158904e+01 9.432751e+00 3.677436 #> [7,] 1.220534e-11 3.477570e+01 3.755492e+01 2.221307e+01 10.226169 #> [8,] -7.412352e-12 1.894140e-11 3.157470e+01 3.638442e+01 21.974247 #> [9,] 3.094456e-12 -1.077663e-11 2.045856e-11 3.109979e+01 36.184101 #> [10,] -1.160055e-12 4.392844e-12 -1.145400e-11 2.097873e-11 31.034906 #> [11,] 4.597583e+01 3.498774e+01 1.851669e+01 8.090370e+00 3.154098 #> [12,] 4.934207e-11 2.982675e+01 3.221045e+01 1.905191e+01 8.770876 #> [13,] -3.006479e-11 7.663859e-11 2.708128e+01 3.120653e+01 18.847077 #> [14,] 1.257909e-11 -4.353840e-11 8.210677e-11 2.667396e+01 31.034717 #> [15,] -4.664996e-12 1.758158e-11 -4.523885e-11 8.450290e-11 26.618307 #> [16,] 3.430708e+01 2.610778e+01 1.381712e+01 6.037018e+00 2.353582 #> [17,] 5.520286e-11 2.225666e+01 2.403538e+01 1.421650e+01 6.544811 #> [18,] -3.358418e-11 8.521750e-11 2.020800e+01 2.328625e+01 14.063653 #> [19,] 1.439355e-11 -4.836064e-11 9.236754e-11 1.990405e+01 23.158047 #> [20,] -5.488696e-12 1.964843e-11 -5.098362e-11 9.339704e-11 19.862530 #> [21,] 1.566615e+01 1.192198e+01 6.309516e+00 2.756773e+00 1.074751 #> [22,] -5.872607e-14 1.016339e+01 1.097563e+01 6.491890e+00 2.988654 #> [23,] -1.485080e-14 -1.663191e-13 9.227877e+00 1.063355e+01 6.422094 #> [24,] 6.791880e-14 2.852644e-13 5.003226e-14 9.089083e+00 10.575002 #> [25,] -4.109639e-14 -1.717459e-13 -1.734915e-13 -3.415573e-13 9.070121 #> #> $sd #> [1] 1.348699e-06 6.177458e-15 0.000000e+00 0.000000e+00 0.000000e+00 #> [6] 1.240358e+00 1.240358e+00 1.240358e+00 1.240358e+00 1.240358e+00 #> [11] 1.240358e+00 1.240358e+00 1.240358e+00 1.240358e+00 1.240358e+00 #> [16] 6.177458e-15 0.000000e+00 2.470983e-14 2.470983e-14 1.348699e-06 #> #> $lower95 #> [1] 305.956299 80.060129 10.218600 20.597105 9.503736 156.044573 #> [7] 20.281273 4.598692 33.217297 4.519037 61.310017 13.515516 #> [13] 50.738330 97.198927 51.279257 17.235277 59.440237 150.837655 #> [19] 215.592921 152.014124 #> #> $upper95 #> [1] 305.956304 80.060129 10.218600 20.597105 9.503736 161.164520 #> [7] 25.401220 9.718639 38.337244 9.638985 66.429965 18.635463 #> [13] 55.858277 102.318875 56.399204 17.235277 59.440237 150.837655 #> [19] 215.592921 152.014129 #>