class_purity {c2c} | R Documentation |
Calculate cluster purity per class
Description
Used to calculate cluster purity from a confusion matrix, for each class (i.e. each row and column of the confusion matrix).
Usage
class_purity(conf_mat)
Arguments
conf_mat |
A confusion matrix from |
Details
Metrics per class are useful when you are comparing two classifications with different numbers of classes, when an overall measure might not be useful or sensible. Purity as defined in Manning (2008).
Value
A data frame with two columns, the first corresponding to the confusion matrix rows, the second corresponding to the confusion matrix columns.
References
Manning, C. D., Raghavan, P., & Schütze, H. (2008) Introduction to information retrieval (Vol. 1, No. 1). Cambridge: Cambridge university press.
[Package c2c version 0.1.0 Index]