confusion: Confusionion Matrix for VegsoupPartition Objects

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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

Usage

1
2
  ## 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:

confus

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

1
2
3
4
5
6
7
8
require(vegsoup)

data(windsfeld)

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

confusion(prt1, prt2)

vegsoup documentation built on Feb. 24, 2021, 3 a.m.