Description Usage Arguments Details Value See Also Examples
Interface function for predicting a partitioned Kriging model.
1 2 3 4 | predictMobKriging(object, newdata = NULL, type = c("response", "node"),
km.args = list())
fittedMobKriging(object, type = c("response", "node"), km.args = list())
|
object |
[ |
newdata |
[ |
type |
[ |
km.args |
[ |
predictMobKriging
calls predict.mob
, but handles name clashes and
generates prettier output.
If type = "node"
a vector of associated terminal node IDs.
If type = "response"
a list
containing at least the Kriging mean and trend
computed at newdata
, depending on km.args
.
predict.mob
, predict.km
, mobKriging
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## currently nonsense example
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)
## linear trend (formula = ~ x1 + x2)
m <- mobKriging(y ~ x1 + x2 | x1 + x2, data = df,
km.args = list(formula = ~ ., control = list(trace = FALSE)))
## predict the response
pred <- predictMobKriging(m, newdata = design, km.args = list(type = "UK",
se.compute = TRUE, cov.compute = TRUE))
## calculate fitted values, only trend and mean
pred <- fittedMobKriging(m, km.args = list(type = "UK", se.compute = FALSE,
light.return = TRUE))
## predict nodes
nodes <- predictMobKriging(m, newdata = design, type = "node")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.