Generate an embedding of a given visit based on interview and examination descriptions and the embeddings of terms. This function calls embed_description function and merge the obtained embeddings of the interview and the examination.

embed_visit(visit_description, inter_term_vectors, exam_term_vectors)

Arguments

visit_description

A named two-element vector (names: "inter" and "exam") of concatenated terms of interview and examination. Terms must be separated by ", ".

inter_term_vectors

A matrix of embeddings of the interview terms

exam_term_vectors

A matrix of embeddings of the examination terms

Value

A vector of the embedding of the visit.

See also

Examples

inter_term_vectors <- embed_terms(interviews, embedding_size = 10L, term_count_min = 1L)
#> 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)))
exam_term_vectors <- embed_terms(examinations, embedding_size = 10L, term_count_min = 1L)
#> Error in .subset2(public_bind_env, "initialize")(...): unused arguments (word_vectors_size = 10, 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)))
embed_visit(c(inter = "", exam = "heart, woman, eye"), inter_term_vectors, exam_term_vectors)
#> Error in ncol(term_vectors): object 'inter_term_vectors' not found
embed_visit(c(inter = "cough", exam = "heart, woman, eye"), inter_term_vectors, exam_term_vectors)
#> Error in ncol(term_vectors): object 'inter_term_vectors' not found
embed_visit(c(inter = "cough", exam = ""), inter_term_vectors, exam_term_vectors)
#> Error in ncol(term_vectors): object 'inter_term_vectors' not found
embed_visit(c(inter = "", exam = "objaw chorobowy"), inter_term_vectors, exam_term_vectors)
#> Error in ncol(term_vectors): object 'inter_term_vectors' not found