confusion {vegsoup}R Documentation

Confusion Matrix for VegsoupPartition Objects

Description

Cross-classifies each partition (clustering) by actual class membership and predicted membership, computes overall accuracy, the Cohen's Kappa statistic of agreement and Goodman-Kruskal's lambda.

Usage

  ## S4 method for signature 'VegsoupPartition,VegsoupPartition'
confusion(obj1, obj2)

Arguments

obj1, obj2

'VegsoupPartition' object. obj1 is compared with obj2.

Details

Method confusion takes two objects inheriting from class VegsoupPartition and computes a cross-tabulation (contingency table) of reference (observed, obj1) vs. comparison (predicted, obj2) class memberships, and calculates the Kappa and Goodman-Kruskal lambda statistics.

Value

A list with the following components:

confusion

the cross tabulation of obj1 (rows) and obj2 (columns).

correct

the percentage of correctly predicted samples.

kappa

the value of the Kappa statistic.

lambda

the value of the lambda statistic.

Author(s)

Roland Kaiser

References

Goodman, L. A. and Kruskal, W. H. 1954 Measures of association for cross-classifications. Journal of the American Statistical Association 49, 732–764.

See Also

VegsoupPartition, accuracy in package 'vegsoup. confus in package optpart and

Examples

require(vegsoup)

data(windsfeld)

prt1 <- VegsoupPartition(windsfeld, k = 10, method = "flexible")
prt2 <- VegsoupPartition(windsfeld, k = 10, method = "pam")

confusion(prt1, prt2)

[Package vegsoup version 0.2-9 Index]