Purity | R Documentation |
Calculate mean weighted cluster purity
Purity(realClusters, predictedClusters, weighted = TRUE)
realClusters |
array with real cluster values |
predictedClusters |
array with predicted cluster values |
weighted |
logical. Should the mean be weighted depending on the number of points in the predicted clusters |
Mean purity score, worst score, number of clusters with score < 0.75
# Generate some random data as an example
realClusters <- sample(1:5, 100, replace = TRUE)
predictedClusters <- sample(1:6, 100, replace = TRUE)
# Calculate the FMeasure
Purity(realClusters, predictedClusters)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.