WarpKriging::copy

Description

Create a deep copy of a WarpKriging model.

Usage

  • Python

    # wk = WarpKriging(...)
    wk2 = wk.copy()
    
  • R

    # wk <- WarpKriging(...)
    wk2 <- wk$copy()
    
  • Matlab/Octave

    % wk = WarpKriging(...)
    wk2 = wk.copy()
    
  • Julia

    # wk = WarpKriging(...)
    wk2 = copy(wk)
    

Arguments

Argument

Description

None

copy() duplicates the current model object without additional arguments.

Details

The copied model keeps the fitted warping specification, latent encoded state, and GP hyper-parameters, but becomes independent from the original object.

Value

A deep copy of the WarpKriging object.

Examples

f <- function(x) 1 - 1 / 2 * (sin(12 * x) / (1 + x) + 2 * cos(7 * x) * x^5 + 0.7)
X <- as.matrix(seq(0.05, 0.95, length.out = 10))
y <- f(X)

wk <- WarpKriging(
  y, X,
  warping = "kumaraswamy",
  kernel = "gauss",
  parameters = list(max_iter_adam = "20", max_iter_bfgs = "10")
)
print(wk)
print(wk$copy())

Results

* WarpKriging
* data: 10x[0.05,0.95] -> 10x[0.163421,0.976851]
* trend constant (est.): 126.685
* variance (est.): 2.63805e+08
* covariance:
  * kernel: gauss
  * range (est.): 9
  * warpings:
      x0: "kumaraswamy"    Kumaraswamy(a=1.01912, b=0.981236)
  * total warp params: 2
  * fit:
    * objective: LL
    * optim: BFGS+Adam
* WarpKriging
* data: 10x[0.05,0.95] -> 10x[0.163421,0.976851]
* trend constant (est.): 148.642
* variance (est.): 2.65025e+08
* covariance:
  * kernel: gauss
  * range (est.): 9
  * warpings:
      x0: "kumaraswamy"    Kumaraswamy(a=1.00903, b=0.991047)
  * total warp params: 2
  * fit:
    * objective: LL
    * optim: BFGS+Adam