Purity {FlowSOM} | R Documentation

## Calculate mean weighted cluster purity

### Description

Calculate mean weighted cluster purity

### Usage

    Purity(realClusters, predictedClusters, weighted = TRUE)

### Arguments

`realClusters` | array with real cluster values
`predictedClusters` | array with predicted cluster values
`weighted` | logical. Should the mean be weighted depending on the number of poins in the predicted clusters

### Value

Mean purity score, worst score, number of clusters with score < 0.75

### Examples

    # 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)

[Package FlowSOM version 1.20.0 Index]