fem.ari: Adjusted Rand index

Description Usage Arguments Value See Also Examples

View source: R/fem.ari.R

Description

The function computes the adjusted Rand index (ARI) which allows to compare two clustering partitions.

Usage

1
fem.ari(x,y)

Arguments

x

A 'fem' object containing the first partition to compare.

y

The second partition to compare (as vector).

Value

ari

The value of the ARI.

See Also

fem, sfem, plot.fem, summary.fem

Examples

1
2
3
4
5
data(iris)
res = fem(iris[,-5],K=2:5,model='AkB')
summary(res)
plot(res)
fem.ari(res,as.numeric(iris[,5]))

Example output

Loading required package: MASS
Loading required package: elasticnet
Loading required package: lars
Loaded lars 1.2

* Model: the chosen model is AkB with K = 4 ( icl = 2201.53 )
* Loading matrix:
                     U1          U2         U3
Sepal.Length -0.3010876 -0.50241546  0.2799094
Sepal.Width  -0.4475662  0.78770792 -0.1466641
Petal.Length  0.6696130  0.02972685 -0.5574864
Petal.Width   0.5105382  0.35526222  0.7676909
[1] 0.8067851

FisherEM documentation built on May 29, 2017, 4:22 p.m.