Description Usage Arguments Value Examples
Cluster visits for given specialty of doctors, based on embeddings of visits. The clustering is performed by the k-means algorithm.
1 2 | cluster_visits(visits_vectors, visit_table, spec, cluster_number = 5,
nstart = 50, iter.max = 15)
|
visits_vectors |
A matrix of embeddings of visits |
visit_table |
A data frame with columns:
|
spec |
A specialty to be clustered |
cluster_number |
A number of desired clusters (default: 5) |
nstart |
Optionally, |
inter.max |
Optionally, |
The result of k-means with: cluster, centers etc.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 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)
clusters$size
sum(clusters$withinss)
clusters$centers
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.