View source: R/pipeline_functions.R
get_clustComp | R Documentation |
get_clustComp
calculates a score to measure the similarity between two classifications.
get_clustComp(pred_label, obs_label, strategy = "ARI")
pred_label |
a vector of characters, the predicted classification labels. |
obs_label |
a vector of characters, the observed classification labels. |
strategy |
character, the method applied to calculate the score. Users can choose "ARI (adjusted rand index)", "NMI (normalized mutual information)" or "Jaccard". Default is "ARI". |
Return a score for the measurement of similarity.
obs_label <- c('A','A','A','B','B','C','D')
pred_label <- c(1,1,1,1,2,2,2)
get_clustComp(pred_label,obs_label)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.