evaluate_term_embeddings.Rd
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
.
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
.
#> Error in .subset2(public_bind_env, "initialize")(...): unused arguments (word_vectors_size = 5, vocabulary = list(c("fever", "man", "mother", "cough", "heart", "patient", "thyroid", "eye", "rhinitis", "woman", "father"), c(2, 2, 2, 3, 3, 3, 3, 4, 5, 6, 7), c(2, 2, 2, 3, 3, 3, 3, 4, 5, 6, 7)))evaluate_term_embeddings(term_vectors, terms_pairs = terms_pairs_test)#> Error in rownames(term_vectors): object 'term_vectors' not found