chooseK_seq2seq
chooses the number of features to be extracted
by cross-validation.
chooseK_seq2seq(seqs, ae_type, K_cand, rnn_type = "lstm", n_epoch = 50,
method = "last", step_size = 1e-04, optimizer_name = "adam",
n_fold = 5, cumulative = FALSE, log = TRUE, weights = c(1, 0.5),
valid_prop = 0.1, gpu = FALSE, parallel = FALSE, seed = 12345,
verbose = TRUE)
an object of class "proc"
.
a string specifies the type of autoencoder. The autoencoder can be an action sequence autoencoder ("action"), a time sequence autoencoder ("time"), or an action-time sequence autoencoder ("both").
the candidates of the number of features.
the type of recurrent unit to be used for modeling
response processes. "lstm"
for the long-short term memory unit.
"gru"
for the gated recurrent unit.
the number of training epochs for the autoencoder.
the method for computing features from the output of an
recurrent neural network in the encoder. Available options are
"last"
and "avg"
.
the learning rate of optimizer.
a character string specifying the optimizer to be used
for training. Availabel options are "sgd"
, "rmsprop"
,
"adadelta"
, and "adam"
.
the number of folds for cross-validation.
logical. If TRUE, the sequence of cumulative time up to each event is used as input to the neural network. If FALSE, the sequence of inter-arrival time (gap time between an event and the previous event) will be used as input to the neural network. Default is FALSE.
logical. If TRUE, for the timestamp sequences, input of the neural net is the base-10 log of the original sequence of times plus 1 (i.e., log10(t+1)). If FALSE, the original sequence of times is used.
a vector of 2 elements for the weight of the loss of action sequences (categorical_crossentropy) and time sequences (mean squared error), respectively. The total loss is calculated as the weighted sum of the two losses.
the proportion of validation samples in each fold.
logical. If TRUE, use gpu for training when available. Default is FALSE.
logical. If TRUE, allow cpu parallel computing. Default is FALSE.
random seed.
logical. If TRUE, training progress is printed.
chooseK_seq2seq
returns a list containing
the candidate in K_cand
producing the smallest cross-validation loss.
the candidates of number of features.
the cross-validation loss for each candidate in K_cand
.
seq2feature_seq2seq
for feature extraction given the number of features.