accuracy: Accuracy Statistics for Objects of class VegsoupPartition

Description Usage Arguments Value Author(s) References Examples

Description

accuracy takes two objects inheriting from class 'VegsoupPartition' (obj1 and obj1) and computes a cross-tabulation (contingency table) of reference (observed) (obj1) vs. compoarison (predicted) class memberships (obj2), and calculates a range of statistics about prediction accuracy.

Usage

1
  accuracy(obj1, obj2)

Arguments

obj1

an object of class 'VegsoupPartition'.

obj2

a second object of class 'VegsoupPartition' to compare to obj1.

Value

A list with the following components:

accuracy

Overall prediction accuracy

recall.predicted

Recall of prediction for each outcome value

precision.predicted

Precision of prediction for each outcome value

lambda.prediction

lambda for prediction accuracy (improvement over baseline of always predicting mode)

tau.classification

tau for classification accuracy (improvement over baseline of homogeneous distribution of predicted outcomes)

d.lambda.prediction

d(lambda): used for calculating P(lambda)

d.tau.classification

d(tau): used for calculating P(tau)

p.lambda.prediction

P(lambda): probability of reaching lambda by chance

p.tau.classification

P(tau): probability of reaching tau by chance

Author(s)

Adopted by Roland Kaiser for vegsoup from code by Antti Arppe for function crosstable.statistics in package polytomous

References

Menard, Scott (1995). Applied Logistic Regression Analysis. Sage University Paper Series on Quantitative Applications in the Social Sciences 07-106. Thousand Oaks: Sage Publications.

Examples

1
2
3
4
5
6
7
require(vegsoup)
data(windsfeld)

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

accuracy(prt1, prt2)

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