Description Usage Arguments Value See Also Examples
Evaluate given term embeddings based on analogy_task and synonym_task.
The list of test pairs should be given. The analogy_task is performed
for each type of given analogies (initially, there are 7 proposed types of analogies,
see terms_pairs_test). The accuracy is measured for the context size from 1 (the most
restrictive) to the given n_max
.
1 | evaluate_term_embeddings(term_vectors, terms_pairs = NULL, n_max = 5L)
|
term_vectors |
A matrix of embeddings of the terms |
n_max |
A maximum number of neighbors included in the context (default: 5) |
terms_pairs: |
A list of lists of the test pairs, each list of pairs should contain two vectors of terms; if the list contains the element "synonym", the synonym_task is performed for these terms, for the rest pairs there is performed analogy_task |
A data frame of accuracies of the analogy task and the synonym task
for each given list of pairs for the context from 1 to n_max
.
analogy_task
, synonym_task
, terms_pairs_test
1 2 3 | term_vectors <- embed_terms(examinations, embedding_size = 5L,
term_count_min = 1L)
evaluate_term_embeddings(term_vectors, terms_pairs = terms_pairs_test)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.