predict_training_data_random_effects.GPModel {gpboost} | R Documentation |
Predict ("estimate") training data random effects for a GPModel
Description
Predict ("estimate") training data random effects for a GPModel
Usage
## S3 method for class 'GPModel'
predict_training_data_random_effects(gp_model,
predict_var = FALSE)
Arguments
gp_model |
A |
predict_var |
A |
Value
A GPModel
Author(s)
Fabio Sigrist
Examples
data(GPBoost_data, package = "gpboost")
# Add intercept column
X1 <- cbind(rep(1,dim(X)[1]),X)
X_test1 <- cbind(rep(1,dim(X_test)[1]),X_test)
gp_model <- fitGPModel(group_data = group_data[,1], y = y, X = X1, likelihood="gaussian")
all_training_data_random_effects <- predict_training_data_random_effects(gp_model)
first_occurences <- match(unique(group_data[,1]), group_data[,1])
unique_training_data_random_effects <- all_training_data_random_effects[first_occurences]
head(unique_training_data_random_effects)
[Package gpboost version 1.5.1.1 Index]