Prints the summary of a class GP object estimated by GP_fit

# S3 method for class 'GP'
print(x, ...)

Arguments

x

a class GP object estimated by GP_fit

...

for compatibility with generic method print

Details

Prints the summary of the class GP object. It returns the number of observations, input dimension, parameter estimates of the GP model, lower bound on the nugget, and the nugget threshold parameter (described in GP_fit).

See also

GP_fit for more information on estimating the model;
print for more description on the print function.

Author

Blake MacDonald, Hugh Chipman, Pritam Ranjan

Examples


## 1D example
n <- 5
d <- 1 
computer_simulator <- function(x){
    x <- 2 * x + 0.5
    y <- sin(10 * pi * x) / (2 * x) + (x - 1)^4
    return(y)
}
set.seed(3)
x <- lhs::maximinLHS(n, d)
y <- computer_simulator(x)
GPmodel <- GP_fit(x, y)
print(GPmodel)
#> 
#> Number Of Observations: n = 5
#> Input Dimensions: d = 1
#> 
#> Correlation: Exponential (power = 1.95)
#> Correlation Parameters: 
#>      beta_hat
#> [1] 0.6433793
#> 
#> sigma^2_hat: [1] 7.262407
#> 
#> delta_lb(beta_hat): [1] 0
#> 
#> nugget threshold parameter: 20
#> 


## 2D Example: GoldPrice Function
computer_simulator <- function(x) {
    x1 <- 4*x[,1] - 2
    x2 <- 4*x[,2] - 2
    t1 <- 1 + (x1 + x2 + 1)^2*(19 - 14*x1 + 3*x1^2 - 14*x2 + 
        6*x1*x2 + 3*x2^2)
    t2 <- 30 + (2*x1 -3*x2)^2*(18 - 32*x1 + 12*x1^2 + 48*x2 - 
        36*x1*x2 + 27*x2^2)
    y <- t1*t2
    return(y)
}
n <- 30 
d <- 2
set.seed(1)
x <- lhs::maximinLHS(n, d) 
y <- computer_simulator(x)
GPmodel <- GP_fit(x,y)
#> Warning: NaNs produced
#> Error in GP_deviance(beta = row, X = X, Y = Y, nug_thres = nug_thres,     corr = corr): Infinite values of the Deviance Function, 
#>             unable to find optimum parameters 
print(GPmodel, digits = 3)
#> 
#> Number Of Observations: n = 5
#> Input Dimensions: d = 1
#> 
#> Correlation: Exponential (power = 1.95)
#> Correlation Parameters: 
#>     beta_hat
#> [1]    0.643
#> 
#> sigma^2_hat: [1] 7.26
#> 
#> delta_lb(beta_hat): [1] 0
#> 
#> nugget threshold parameter: 20
#>