Predictor for a multiobjective Kriging model

Share:

Description

This functions performs predictions for a given dataset into a collection of Kriging models (mkm object)

Usage

1
2
## S4 method for signature 'mkm'
predict(object, newdata, modelcontrol = NULL)

Arguments

object

An object of class mkm

newdata

a vector, matrix or data frame containing the points where to perform predictions.

modelcontrol

An optional list of control parameters to the mkm function (default: object@control).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# ------------------------
# The Nowacki Beam
# ------------------------
n <- 100
d <- 2
N <- 50
doe <- replicate(d,sample(0:n,n))/n
res <- t(apply(doe, 1, nowacki_beam))
model <- mkm(doe, res, modelcontrol = list(objective = 1:2, lower = rep(0.01, d)))
newx <- expand.grid(replicate(d,seq(0,1,,N),FALSE))
pred <- predict(model, newx)
realv <- t(apply(newx, 1, nowacki_beam))
par(mfrow=c(2,3), mar=c(2,2,1,1))
for (i in 1:6){
  contour(matrix((realv[,i]),N), col='red', lty=2, labels='')
  contour(matrix((pred$mean[,i]),N), add = TRUE)
}