Last data update: 2014.03.03

R: Adjusted Rand index
fem.ariR Documentation

Adjusted Rand index

Description

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

Usage

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

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(FisherEM)
Loading required package: MASS
Loading required package: elasticnet
Loading required package: lars
Loaded lars 1.2

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/FisherEM/fem.ari.Rd_%03d_medium.png", width=480, height=480)
> ### Name: fem.ari
> ### Title: Adjusted Rand index
> ### Aliases: fem.ari
> 
> ### ** Examples
> 
> data(iris)
> res = fem(iris[,-5],K=2:5,model='AkB')
> summary(res)
* Model: the chosen model is AkB with K = 4 ( icl = 2501.832 )
* 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
> plot(res)
> fem.ari(res,as.numeric(iris[,5]))
[1] 0.8067851
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>