View source: R/approach_vaeac.R
vaeac_train_model | R Documentation |
Function that fits a vaeac model to the given dataset based on the provided parameters,
as described in Olsen et al. (2022). Note that
all default parameters specified below origin from setup_approach.vaeac()
and
vaeac_get_extra_para_default()
.
vaeac_train_model(
x_train,
model_description,
folder_to_save_model,
cuda,
n_vaeacs_initialize,
epochs_initiation_phase,
epochs,
epochs_early_stopping,
save_every_nth_epoch,
val_ratio,
val_iwae_n_samples,
depth,
width,
latent_dim,
lr,
batch_size,
running_avg_n_values,
activation_function,
skip_conn_layer,
skip_conn_masked_enc_dec,
batch_normalization,
paired_sampling,
masking_ratio,
mask_gen_coalitions,
mask_gen_coalitions_prob,
sigma_mu,
sigma_sigma,
save_data,
log_exp_cont_feat,
which_vaeac_model,
verbose,
seed,
...
)
x_train |
A data.table containing the training data. Categorical data must have class names |
model_description |
String (default is |
folder_to_save_model |
String (default is |
cuda |
Logical (default is |
n_vaeacs_initialize |
Positive integer (default is |
epochs_initiation_phase |
Positive integer (default is |
epochs |
Positive integer (default is |
epochs_early_stopping |
Positive integer (default is |
save_every_nth_epoch |
Positive integer (default is |
val_ratio |
Numeric (default is |
val_iwae_n_samples |
Positive integer (default is |
depth |
Positive integer (default is |
width |
Positive integer (default is |
latent_dim |
Positive integer (default is |
lr |
Positive numeric (default is |
batch_size |
Positive integer (default is |
running_avg_n_values |
running_avg_n_values Positive integer (default is |
activation_function |
An |
skip_conn_layer |
Logical (default is |
skip_conn_masked_enc_dec |
Logical (default is |
batch_normalization |
Logical (default is |
paired_sampling |
Logical (default is |
masking_ratio |
Numeric (default is |
mask_gen_coalitions |
Matrix (default is |
mask_gen_coalitions_prob |
Numeric array (default is |
sigma_mu |
Numeric (default is |
sigma_sigma |
Numeric (default is |
save_data |
Logical (default is |
log_exp_cont_feat |
Logical (default is |
which_vaeac_model |
String (default is |
verbose |
String vector or NULL.
Specifies the verbosity (printout detail level) through one or more of strings
|
seed |
Positive integer (default is |
... |
List of extra parameters, currently not used. |
The vaeac model consists of three neural networks, i.e., a masked encoder, a full encoder, and a decoder.
The networks have shared depth
, width
, and activation_function
. The encoders maps the x_train
to a latent representation of dimension latent_dim
, while the decoder maps the latent representations
back to the feature space. See Olsen et al. (2022)
for more details. The function first initiates n_vaeacs_initialize
vaeac models with different randomly
initiated network parameter values to remedy poorly initiated values. After epochs_initiation_phase
epochs, the
n_vaeacs_initialize
vaeac models are compared and the function continues to only train the best performing
one for a total of epochs
epochs. The networks are trained using the ADAM optimizer with the learning rate is lr
.
A list containing the training/validation errors and paths to where the vaeac models are saved on the disk.
Lars Henry Berge Olsen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.