This R package computes an assessment of the accuracy of remotely sensed change maps using the area of each class in the map. The assesment is based on the good practices proposed by Pontus Olofsson.
Related resources: - Video: Assessing Accuracy and Estimating Area of Remotely Sensed Change Maps - Paper: Good practices for estimating area and assessing accuracy of land change - Paper: Making better use of accuracy data in land change studies: Estimating accuracy and area and quantifying uncertainty using stratified estimation
This package can be installed using devtools as follows:
library(devtools)
install_github("albhasan/mapAccuracy")
The package take as inputs a confusion matrix resulting from a classification and the are of each class in a reference map. The following example was introduced by Pontus Olofsson in one of his videos.
library(mapAccuracy)
# assume the following confusion matrix and are vector
classnames <- c("deforested", "forested", "no forested")
confusion_matrix <- matrix(c(97, 0, 3, 3, 279, 18, 2, 1, 97), ncol = 3, byrow = TRUE)
class_areas <- c(22353, 1122543, 610228)
# Name the rows and columns accordingly
colnames(confusion_matrix) <- rownames(confusion_matrix) <- classnames
names(class_areas) <- classnames
# Compute the accuracy metrics and display the results
ma <- new(Class = "MapAccuracy", confusion_matrix = confusion_matrix, class_areas = class_areas)
acc <- compute(ma)
acc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.