evaluateClustering {pipeComp} | R Documentation

## evaluateClustering

### Description

Evaluates a clustering using 'true' labels. Entries with missing true labels (i.e. NA) are excluded from calculations.

### Usage

    evaluateClustering(x, tl = NULL)

### Arguments

`x` | The clustering labels
`tl` | The true labels

### Value

A numeric vector of metrics (see the 'pipeComp_scRNA' vignette for details)

### Examples

    # random data
    dat <- data.frame(
     cluster=rep(LETTERS[1:3], each=10),
     x=c(rnorm(20, 0), rnorm(10, 1)),
     y=c(rnorm(10, 1), rnorm(20, 0))
    )
    # clustering
    dat$predicted <- kmeans(dist(dat[,-1]),3)$cluster
    # evaluation
    evaluateClustering(dat$predicted, dat$cluster)

[Package pipeComp version 1.0.0 Index]