Description Usage Arguments Value Examples
Assign a given visit to the closest cluster from a given clustering. The function generates the embedding of the visit (by the function embed_visit) and computed the squared Euclidean distance from the clusters' centers.
1 2 | assign_visit_to_cluster(visit_description, clusters, inter_term_vectors,
exam_term_vectors)
|
visit_description |
A named two element vector (with names: |
clusters |
An output of the function cluster_visits |
inter_term_vectors |
A matrix of embeddings of the interview terms |
exam_term_vectors |
A matrix of embeddings of the examination terms |
A list of:
|
The number of the closest cluster |
|
The vector of distances to each cluster |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | inter_term_vectors <- embed_terms(interviews, embedding_size = 10L,
term_count_min = 1L)
exam_term_vectors <- embed_terms(examinations, embedding_size = 10L,
term_count_min = 1L)
visits_vectors <- embed_list_visits(interviews,
examinations, inter_term_vectors, exam_term_vectors)
clusters <- cluster_visits(visits_vectors, visits,
spec = "internist",
cluster_number = 2L)
assign_visit_to_cluster(c(inter = "cough, fever, rhinitis", exam = ""),
clusters, inter_term_vectors, exam_term_vectors)
assign_visit_to_cluster(c(inter = "thyroid", exam = ""),
clusters, inter_term_vectors, exam_term_vectors)
assign_visit_to_cluster(c(inter = "cough, fever, rhinitis",
exam = "patient, heart"),
clusters, inter_term_vectors, exam_term_vectors)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.