R: Rand Index and Adjusted Rand Index

RRand {phyclust} | R Documentation

## Rand Index and Adjusted Rand Index

### Description

This function returns the Rand index and the adjusted Rand index for given true class ids and predicted class ids.

### Usage

    RRand(trcl, prcl, lab = NULL)

### Arguments

`trcl` | true class ids.
`prcl` | predicted class ids.
`lab` | known ids for semi-supervised clustering.

### Details

All ids, `trcl` and `prcl`, should be positive integers and started from 1 to K, and the maximums are allowed to be different.

`lab` used in semi-supervised clustering contains the labels which are known before clustering. It should be positive integer and started from 1 for labeled data and 0 for unlabeled data.

### Value

Return a `Class RRand` contains Rand index and adjusted Rand index.

### Author(s)

Ranjan Maitra.

Maintain: Wei-Chen Chen wccsnow@gmail.com

### References

Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/

### Examples

    ## Not run:
    library(phyclust, quiet = TRUE)

    true.id <- c(1, 1, 1, 2, 2, 2, 3, 3, 3)
    pred.id <- c(2, 1, 2, 1, 1, 1, 2, 1, 1)
    label   <- c(0, 0, 0, 0, 1, 0, 2, 0, 0)

    RRand(true.id, pred.id)
    RRand(true.id, pred.id, lab = label)

    ## End(Not run)

[Package phyclust version 0.1-30 Index]