embed_description.Rd
Compute a simple average of embeddings of given terms of a description. Only terms that have embeddings are included. If there are not such terms, the vector of NA is returned.
embed_description(description, term_vectors)
description | A string of concatenated terms extracted from a visit, separated by |
---|---|
term_vectors | A matrix of embeddings of the terms |
A vector of the embedding of the description.
#> Error in .subset2(public_bind_env, "initialize")(...): unused arguments (word_vectors_size = 10, vocabulary = list(c("fever", "rhinitis", "cough", "eye", "thyroid"), c(3, 3, 4, 4, 6), c(3, 3, 4, 4, 6)))embed_description("fever", term_vectors)#> Error in ncol(term_vectors): object 'term_vectors' not foundembed_description("fever, cough", term_vectors)#> Error in ncol(term_vectors): object 'term_vectors' not foundembed_description("fever, cough, temperature", term_vectors)#> Error in ncol(term_vectors): object 'term_vectors' not foundembed_description("temperature", term_vectors)#> Error in ncol(term_vectors): object 'term_vectors' not found