LVGP_fit {LVGP}R Documentation

The Fitting Function of LVGP Package

Description

Fits a latent-variable Gaussian process (LVGP) model to a dataset as described in reference 1. The input variables can be quantitative or qualitative/categorical or mixed. The output variable is quantitative and scalar.

Usage

LVGP_fit(X, Y, ind_qual = NULL, dim_z = 2, eps = 10^(seq(-1, -8,
  length.out = 15)), lb_phi_ini = -2, ub_phi_ini = 2,
  lb_phi_lat = -8, ub_phi_lat = 3, lb_z = -3, ub_z = 3,
  n_opt = 8, max_iter_ini = 100, max_iter_lat = 20, seed = 123,
  progress = FALSE, parallel = FALSE, noise = FALSE)

Arguments

X

Matrix or data frame containing the inputs of training data points. Each row is a data point.

Y

Vector containing the outputs of training data points

ind_qual

Vector containing the indices of columns of qualitative/categorical variables

dim_z

Dimensionality of latent space, usually 1 or 2 but can be higher

eps

The vector of smallest eigen values that the correlation matrix is allowed to have, which determines the nugget added to the correlation matrix.

lb_phi_ini, ub_phi_ini

The initial lower and upper search bounds of the scale/roughness parameters (phi) of quantitative variables

lb_phi_lat, ub_phi_lat

The later lower and upper search bounds of the scale/roughness parameters (phi) of quantitative variables

lb_z, ub_z

The lower and upper search bounds of the latent parameters (z) of qualitative variables

n_opt

The number of times the log-likelihood function is optimized

max_iter_ini

The maximum number of iterations for each optimization run for largest (first) eps case

max_iter_lat

The maximum number of iterations for each optimization run for after first eps cases

seed

An integer for the random number generator. Use this to make the results reproducible.

progress

The switch determining whether to print function run details

parallel

The switch determining whether to use parallel computing

noise

The switch for whether the data are assumed noisy

Value

A model of class "LVGP model" list of the following items:

References

  1. "A Latent Variable Approach to Gaussian Process Modeling with Qualitative and Quantitative Factors", Yichi Zhang, Siyu Tao, Wei Chen, and Daniel W. Apley (arXiv)

See Also

optim for the details on L-BFGS-B algorithm used in optimization.
LVGP_predict to use the fitted LVGP model for prediction.
LVGP_plot to plot the features of the fitted model.

Examples

# Math example with 2 quantitative and 1 qualitative variables (dataset included in the package):
#     Fit a model (with default settings) and evaluate the performance
#     by computing the root mean squared error (RMSE) in prediction.
#     Also, plot the latent variable parameters.
X_tr <- math_example$X_tr
Y_tr <- math_example$Y_tr
X_te <- math_example$X_te
Y_te <- math_example$Y_te
n_te <- nrow(X_te)
model <- LVGP_fit(X_tr, Y_tr, ind_qual = c(3))
output <- LVGP_predict(X_te, model)
Y_hat <- output$Y_hat
RRMSE <- sqrt(sum((Y_hat-Y_te)^2)/n_te)/(max(Y_te)-min(Y_te))
LVGP_plot(model)


[Package LVGP version 2.1.5 Index]