get_clustComp: Get Score to Measure Similarity Between Observed...

View source: R/pipeline_functions.R

get_clustCompR Documentation

Get Score to Measure Similarity Between Observed Classification and Predicted Classification.

Description

get_clustComp calculates a score to measure the similarity between two classifications.

Usage

get_clustComp(pred_label, obs_label, strategy = "ARI")

Arguments

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".

Value

Return a score for the measurement of similarity.

Examples

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)

jyyulab/NetBID documentation built on Dec. 23, 2024, 6:34 a.m.