Description Usage Arguments Details Value Examples
Interface function for recursive partitioning of Kriging models.
1 | mobKriging(obj, part, feat, data, control = mob_control(), km.args = list())
|
obj |
[ |
part |
[ |
feat |
[ |
data |
[ |
control |
[ |
km.args |
[ |
mobKriging is an interface to function mob with fixed argument model = kmModel that
avoids name clashes between arguments of mob and km.
(For example, both, km and mob, have arguments called formula and control.)
The formula argument of km which specifies the linear trend of the kriging model
must only contain the modeling features (x1 to xk).
It can be passed to km via the km.args argument, see the examples.
An object of class mob inheriting from BinaryTree.
Every node of the tree is associated with a fitted Kriging model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | if (require(DiceKriging)) {
d <- 2L
x <- seq(0, 1, length = 10L)
design <- expand.grid(x1 = x, x2 = x)
y <- apply(design, 1, branin)
df <- data.frame(y = y, design)
## no trend (formula = ~ 1)
m <- mobKriging(y ~ x1 + x2 | x1 + x2, data = df,
control = mob_control(verbose = TRUE))
## linear trend using all modeling features (formula = ~ .)
m <- mobKriging(y ~ x1 + x2 | x1 + x2, data = df,
km.args = list(formula = ~ ., control = list(trace = FALSE)),
control = mob_control(minsplit = 30L, verbose = FALSE))
## linear trend using all modeling features (formula = ~ .)
m <- mobKriging(obj = "y", feat = c("x1", "x2"), part = c("x1", "x2"), data = df,
km.args = list(formula = ~ ., control = list(trace = FALSE)),
control = mob_control(verbose = FALSE, parm = 1:4))
coef(m)
# logLik(m)
# residuals(m)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.