ft.control {fastTextR} | R Documentation |
A auxiliary function for defining the control variables.
ft.control(loss = c("softmax", "hs", "ns"), learning_rate = 0.05, learn_update = 100L, word_vec_size = 5L, window_size = 5L, epoch = 5L, min_count = 5L, min_count_label = 0L, neg = 5L, max_len_ngram = 1L, nbuckets = 2000000L, min_ngram = 3L, max_ngram = 6L, nthreads = 1L, threshold = 1e-04, label = "__label__", verbose = 0, pretrained_vectors = "")
loss |
a character string giving the name of the loss function
allowed values are |
learning_rate |
a numeric giving the learning rate, the default value is |
learn_update |
an integer giving after how many tokens the learning rate
should be updated. The default value is |
word_vec_size |
an integer giving the length (size) of the word vectors. |
window_size |
an integer giving the size of the context window. |
epoch |
an integer giving the number of epochs. |
min_count |
an integer giving the minimal number of word occurences. |
min_count_label |
and integer giving the minimal number of label occurences. |
neg |
an integer giving how many negatives are sampled (only used if loss is |
max_len_ngram |
an integer giving the maximum length of ngrams used. |
nbuckets |
an integer giving the number of buckets. |
min_ngram |
an integer giving the minimal ngram length. |
max_ngram |
an integer giving the maximal ngram length. |
nthreads |
an integer giving the number of threads. |
threshold |
a numeric giving the sampling threshold. |
label |
a character string specifying the label prefix (default is |
verbose |
an integer giving the verbosity level, the default value
is |
pretrained_vectors |
a character string giving the file path to the pretrained word vectors which are used for the supervised learning. |
a list with the control variables.
ft.control(learning_rate=0.1)