weighted_element_consistency | R Documentation |
Calculate the weighted element-centric consistency of a set of clusterings. The weights are used to give more importance to some clusterings over others.
weighted_element_consistency(
clustering_list,
weights = NULL,
calculate_sim_matrix = FALSE
)
clustering_list |
The list of clustering results, each of which is either:
|
weights |
A numeric vector of weights for each clustering in
|
calculate_sim_matrix |
A logical value that indicates whether to
calculate the similarity matrix or not along with the consistency score.
Defaults to |
A vector containing the weighted element-wise consistency. If
calculate_sim_matrix
is set to TRUE
, the element similarity matrix
will be returned as well.
The weighted ECC will be calculated as \displaystyle \frac{\sum_{i} \sum_{j} w_i w_j ECS(i, j)}{\sum_{i} w_i}
# cluster across 20 random seeds
clustering_list <- lapply(1:20, function(x) kmeans(mtcars, centers = 3)$cluster)
weights <- sample(1:10, 20, replace = TRUE)
weighted_element_consistency(clustering_list, weights = weights)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.