action2entropy: Step 1 of Subtask Analysis: obtaining entropy sequences of...

Description Usage Arguments Value References See Also

View source: R/subtask.R

Description

action2entropy fit a recurrent-neural-network-based action prediction model to a set of action sequences action_seqs.

Usage

1
2
3
action2entropy(action_seqs, rnn_dim = 20, n_epoch = 50,
  step_size = 0.001, batch_size = 1, optimizer_name = "rmsprop",
  index_valid = 0.2, verbose = FALSE)

Arguments

action_seqs

a list of action sequences

rnn_dim

latent dimension of RNN

n_epoch

the number of training epochs.

step_size

the learning rate of optimizer.

batch_size

the batch size used in training.

optimizer_name

a character string specifying the optimizer to be used for training. Availabel options are "sgd", "rmsprop", "adadelta", and "adam".

index_valid

proportion of sequences used as the validation set or a vector of indices specifying the validation set.

verbose

logical. If TRUE, training progress is printed.

Value

action2entropy returns a list containing

entropy_seqs

a list of entropy sequences. The length of each entropy sequence is one less than that of the corresponding action sequence.

loss_history

a n_epoch by 2 matrix. The two columns contain the loss at the end of each epoch on the training set and the validation set, respectively.

rnn_dim

the latent dimension of the recurrent neural network

model_fit

a vector of class "raw". It is the serialized version of the trained keras model.

actions

a vector of the actions in action_seqs.

max_len

maximum length of the action sequences.

References

Wang, Z., Tang, X., Liu, J., and Ying, Z. (2020) Subtask analysis of process data through a predictive model. https://arxiv.org/abs/2009.00717

See Also

entropy2segment and segment2subtask for steps 2 and 3 of the subtask analysis procedure; subtask_analysis for the complete procedure.


xytangtang/ProcData documentation built on May 30, 2021, 1:21 a.m.