The accuracy and the area of a map's classes from a stratified random sample labelled with the reference class (Olofsson et al. 2014): the error matrix in shares of the area, the user's, producer's and overall accuracies, and each class's area estimated from the sample instead of counted on the map, with standard errors and confidence intervals; as R's mapaccuracy: olofsson when the strata are the map's classes, stehman2014 for strata of their own (a map of strata, or the finite population correction).
Input
Type
What it is
maprequired
map
the classified map: its class at each point and its cells by class
points
vector
the sample's points with their reference class (accuracy.sample's, labelled)
samples
table
the sample as a table instead: columns map and reference (and stratum, with strata)
strata
map
the strata of the sample when they are not the map's classes (e.g. an older map, or a buffer around change)
Output
Type
What it is
table
table
a row per class: class, map_cells, samples, user_accuracy, user_se, user_ci, producer_accuracy, producer_se, producer_ci, area_share, area_share_se, area_cells, area_cells_ci, area_ha, area_ha_ci (the _ci the half-widths of the confidence intervals)
the error matrix in shares of the area: a row per class of the map, a column per reference class
counts
table
the error matrix in sample units
Setting
Type
What it is
reference
text
the column of the reference class (default reference)
estimator
text
olofsson (the strata are the map's classes), stehman (strata of their own, the finite population correction); auto (default): stehman with strata, else olofsson
confidence
number
the level of the confidence intervals (default 0.95)
A stratified random sample of a map's cells for its accuracy and area (Olofsson et al. 2014): in every stratum its share of cells drawn without replacement, as numpy's default_rng(seed).choice of the stratum's cells, stratum after stratum (increasing); the points at the cells' centres, by stratum and cell. Give each point its reference class (the column reference, from imagery or the field) and take them to accuracy.assess.
Input
Type
What it is
maprequired
map
the strata: the classified map, or a map of strata
sizes
table
the sample of each stratum: columns stratum and n (accuracy.sample_size's table)
Output
Type
What it is
points
vector
the points: id, stratum, row, col, x, y and reference (empty, to be filled)
cells
map
the stratum of the cells drawn, missing elsewhere
Setting
Type
What it is
n
any
the sample of each stratum instead of sizes: a number for all, or {stratum: n}
The size of a stratified random sample for the accuracy and the area of a map, and its share of each stratum (Olofsson et al. 2014): n = (Σ W_i S_i / S(Ô))², W_i a stratum's share of the map, S_i = √(U_i (1 − U_i)) from the user's accuracy expected of it, S(Ô) the standard error wanted of the overall accuracy. Shared with a minimum in every stratum (the good practice when some classes are rare, such as change: the rest in proportion to the areas), in proportion, equally or by Neyman's allocation.
Input
Type
What it is
maprequired
map
the strata: the classified map, or a map of strata
Output
Type
What it is
table
table
a row per stratum: stratum, cells, weight, user_accuracy, sd, n
n
integer
the size of the sample
Setting
Type
What it is
user_accuracy
any
the user's accuracy expected of each stratum: a number for all (default 0.9), or {class: accuracy} (the others 0.9); lower for the classes hard to map, such as change (Olofsson's 0.6 to 0.7)
standard_error
number
the standard error wanted of the overall accuracy (default 0.01)
n
integer
the size of the sample, instead of the formula's
allocation
text
how the sample is shared among the strata (default minimum)
minimum
integer
the sample of every stratum at least, or all its cells (allocation minimum; default 50; Olofsson suggests 50 to 100)
Esc
Try MSPA, least cost, weights of evidence or coordinator.