embed_list_visits.Rd
Generate embeddings of given visits, contained in two named vectors. One vector contains the descriptions of interviews and the second -- the descriptions of examinations. This function interatively calls embed_visit function.
embed_list_visits(inter_descriptions, exam_descriptions, inter_term_vectors, exam_term_vectors)
inter_descriptions | A vector of descriptions of interviews, named by visits' IDs; terms in the descriptions are separated by ", " |
---|---|
exam_descriptions | A vector of descriptions of examinations, named by visits' IDs; the visits' IDs do not have to be identical to inter_descriptions |
inter_term_vectors | A matrix of embeddings of the interview terms |
exam_term_vectors | A matrix of embeddings of the examination terms |
A matrix of embeddings of visits -- in each row there is an embedding of one visit.
#> 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)))#> 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)))visits_vectors <- embed_list_visits(interviews, examinations, inter_term_vectors, exam_term_vectors)#> Error in ncol(term_vectors): object 'inter_term_vectors' not found#> Error in nrow(visits_vectors): object 'visits_vectors' not foundvisits_vectors#> Error in eval(expr, envir, enclos): object 'visits_vectors' not found#> Error in visits_vectors[is.na(visits_vectors)] <- 0: object 'visits_vectors' not found#> Error in as.matrix(x): object 'visits_vectors' not found#> Error in D > 0: comparison (6) is possible only for atomic and list typesvisits_vectors <- embed_list_visits(interviews, "", inter_term_vectors, exam_term_vectors)#> Error in ncol(term_vectors): object 'inter_term_vectors' not found#> Error in nrow(visits_vectors): object 'visits_vectors' not foundvisits_vectors#> Error in eval(expr, envir, enclos): object 'visits_vectors' not found