Description Usage Arguments Value
Trains and saves a LSTM Variational Autoencoder
1 2 3 4 5 6 7 | trainModel(namesA, namesB, dim.latent = 8, dim.encode = 64,
dim.decode = 64, max.length = 12, num.encode.layers = 2,
num.decode.layers = 2, batch.size = 32, epochs = 100, lr = 1e-04,
validation.split = 0.2, save.dir = "~/blocking_models/",
reconstruct = TRUE, reconstruct.n = 5, reconstruct.display = 20,
earlystop = TRUE, earlystop.patience = 10, tensorboard = TRUE,
tensorboard.runid = as.character(Sys.time()), verbose = 2)
|
namesA |
Character vector of names |
namesB |
Character vector of names known to be matches of namesA. Length of namesA and namesB must be equal. |
dim.latent |
Number of dimensions to use in the latent vector |
dim.encode |
Number of hidden units to use in each of the encoding layers |
dim.decode |
Number of hidden units to use in each of the decoding layers |
max.length |
Maximum length of each name |
num.encode.layers |
Number of encoding layers to use |
num.decode.layers |
Number of decoding layers to use |
batch.size |
Batch size of model training |
epochs |
Number of epochs to train for |
lr |
Learning rate of model. This model is configured to use to the Adam optimizer. |
validation.split |
Percentage of data to save for validation |
save.dir |
Directory to save the trained encoder |
reconstruct |
Whether or not show reconstructions |
reconstruct.n |
How many reconstructions to show |
reconstruct.display |
After many epochs to show reconstructions |
earlystop |
TRUE if stopping early when validation loss is no longer decreasing, if FALSE then train for all epochs |
earlystop.patience |
Number of epochs to wait while validation loss does not decrease before stopping training early |
tensorboard |
TRUE if tensorboard metrics are to be recorded. Logs are recorded in the /tmp/ directory |
tensorboard.runid |
Unique identifier for the run to separate tensorboard logs |
verbose |
Verbosity level for training output, 0 = silence, 1 = minimal, 2 = verbose |
Trained encoder model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.