classAccuracy: classAccuracy

Description Usage Arguments Value References Examples

Description

Calculates common classification accuracies measures known from remote sensing applications based on a Confusion Matrix that compares Reference classes to their respective class predictions. The computed accuracy measures are:

Usage

1
2
3
4
5
6
7
8
classAccuracy(..., conf.level = 0.95)

## S3 method for class 'hsmclass'
classAccuracy(object, conf.level = 0.95, ...)

## Default S3 method:
classAccuracy(refdata, predictions, equal.int = NA,
  def.int = NA, conf.level = 0.95, ...)

Arguments

...

further arguments passed to or used by methods.

conf.level

the confidence level used to compute the confidence intervals of the overall accuracy.

object

object of class 'hsmclass' created by function HSMclass.

refdata

vector containing the values of the continuous response variable used in the prediction model.

predictions

vector containing the predictions for the response values of the prediction model. Note:(refdata and predictions have to correspond to each other).

equal.int

an equidistant class interval to be evaluated as classifciation scheme. Defaults to NA. Can only be set if def.int is NA.

def.int

a vector defining an arbitrary set of class breaks to be evaluated as classifciation scheme. Defaults to NA. Can only be set if def.int is NA.

Value

classAccuracy returns an object of class "classaccur"

An object of class "classaccur" returns a list of the following components:

rsquared_val

the coefficient of determination of the prediction model, calulated based on refdata and predictions

.

predictions

vector containing the predictions given to classAccuracy

classwidth

vector containing the class width

def.classbreaks

vector containing arbitrary class break values

equal.classbreaks

vector containing equidistant class break values

overall.accuracy

the overall accuracy of the classification scheme

conf.oaa

vector containing [1] the lower confidence limit of the OAA, [2] the upper confidence limit of the OAA, and [3] the confidence level

prodaccuracy

a matrix containing the producer's accuracy for each class

usersaccuracy

a matrix containing the user's accuracy for each class

no.ref.classes

a vector containing the number of reference data for each class

cohenskappa

Cohen's Kappa Coefficient

map.accuracy

the map accuracy

Quantity.Disagreement

the quantity disagreement

Allocation.Disagreement

the allocation disagreement

References

Congalton, R.G.; Green, K. Assessing the Accuracy of Remotely Sensed Data: Principles and Practices; Lewis Publications: Boca Raton, FL, USA, 1999; p. 137.

Richards, J.A. Remote Sensing Digital Image Analysis: An Introduction, 5th ed.; Springer: Berlin, Germany, 2013.

Hill, A., Breschan, J., & Mandallaz, D. (2014). Accuracy assessment of timber volume maps using forest inventory data and LiDAR canopy height models. Forests, 5(9), 2253-2275.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#----
# 1.) Example: classification accuracy for equidistant class width of 100:
#----

acc.equal<- classAccuracy(refdata.gr, predictions.gr, equal.int = 100)
summary(acc.equal)


#----
# 2.) Example: classification accuracy for arbitrary class breaks:
#----

acc.def<- classAccuracy(refdata.gr, predictions.gr,
                       def.int = c(0, 150, 200, 430, 610, 880))
summary(acc.def)


#----
# 3.) Example: classification accuracy for optimal class breaks:
#----

# run HSMclass:
## Not run: 
hsm<- HSMclass(refdata.gr, predictions.gr, nclasses = 6,
              iterations = 1000, coolfactor=0.99, InitTemp = 80,
              weight.norefs = 2, weight.classwidth = 2)

# calculate accuracy:
acc.opti<- classAccuracy(hsm)
summary(acc.opti)

## End(Not run)

AndreasChristianHill/classoptimr documentation built on May 29, 2019, 12:23 p.m.