predictCK: Predict response from a km* model

View source: R/predict.R

predictCKR Documentation

Predict response from a km* model

Usage

predictCK(object, newdata, nsim = 100)

Arguments

object

km* model

newdata

a vector which represents the points where to performs predictions

nsim

the number of response vectors to simulate

Examples

predict(object=kmMonotonic1D(design=c(0.1, 0.5, 0.9), response=c(1, 5, 9)), newdata=seq(f=0, t=1, l=100), nsim=10)
predict(object=kmConvex1D(design=c(0.1, 0.5, 0.9), response=c(5, 1, 9)), newdata=seq(f=0, t=1, l=100), nsim=10)
design = c(0.1, 0.5, 0.9)
response = c(1, 8, 9)
model = kmMonotonic1D(design, response)
graphics::plot(x=seq(0,1,,100),y=predict(object=model, newdata=seq(0,1,,100), nsim=100)[,'Median'], type='l')
points(design, response, pch=19)

maatouk/constrKriging documentation built on April 24, 2024, 7:13 p.m.