Tune VAEReg on a train/validation split
Arguments
- X_tr
Train predictors matrix.
- y_tr
Train response numeric.
- X_va
Validation predictors matrix.
- y_va
Validation response numeric.
- seed
Integer seed.
- grid_vae
Data frame with required columns:
hidden_enc(list),hidden_dec(list),latent_dim,dropout,lr,beta_kl,alpha_y,epochs,batch_size,patience.
Examples
if (FALSE) { # \dontrun{
vae_configure()
X <- matrix(rnorm(500), nrow = 50, ncol = 10)
y <- rnorm(50)
grid <- data.frame(
latent_dim = 4L, dropout = 0.1, lr = 0.001,
beta_kl = 1, alpha_y = 1, epochs = 5L,
batch_size = 16L, patience = 3L
)
grid$hidden_enc <- list(c(32L, 16L))
grid$hidden_dec <- list(c(16L, 32L))
result <- tune_vae_train_val(
X_tr = X[1:40, ], y_tr = y[1:40],
X_va = X[41:50, ], y_va = y[41:50],
grid_vae = grid
)
} # }