The metrica
package was developed to
visualize and compute the level of agreement between observed
ground-truth values and model-derived (e.g., mechanistic or empirical)
predicted.
This package is intended to fit into the following workflow:
metrica
package is used to compute and
evaluate the classification model based on observed and predicted
valuesmetrica
package is used to visualize model fit
and selected fit metricsThis vignette introduces the functionality of the
metrica
package applied to observed and
model-predicted values of a binary land cover classification scenario,
where the two classes are vegetation (1) and non-vegetation (0)).
Let’s begin by loading the packages needed.
## Libraries
library(metrica)
library(dplyr)
library(purrr)
library(tidyr)
Now we load the binary land_cover
data set already
included with the metrica
package. This data set contains
two columns:
predicted
: model-predicted (random forest) land
cover, being vegetation = 1 and other = 0,
actual
: ground-truth observed land cover, being 0 =
vegetation and 1 = other
# Load
<- metrica::land_cover
binary_landCover
# Printing first observations
head(binary_landCover)
#> actual predicted
#> 1 0 0
#> 2 1 1
#> 3 1 1
#> 4 0 0
#> 5 0 0
#> 6 1 1