Title: | Calculates the j-Score Between Two Clustering Assignments |
---|---|
Description: | The jscore() function in the package calculates the J-Score metric between two clustering assignments. The score is designed to address some problems with existing common metrics such as problem of matching. The details of J-score is described in Ahmadinejad and Liu. (2021) <arXiv:2109.01306>. |
Authors: | Navid Ahmadinejad [cre, aut], Li Liu [aut] |
Maintainer: | Navid Ahmadinejad <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-03 05:36:16 UTC |
Source: | https://github.com/liliulab/jscore |
Calculates the j-score between two clustering assignment.
jscore(truth, pred)
jscore(truth, pred)
truth |
A numeric vector of truth class labels. |
pred |
A numeric vector of predicted class labels. |
Returns the j-score of the clustering assignment.
truth=c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3) pred= c(1,1,1,2,2,2,3,3,3,4,4,4,5,5,5) jscore(truth, pred)
truth=c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3) pred= c(1,1,1,2,2,2,3,3,3,4,4,4,5,5,5) jscore(truth, pred)