make_sure_no_spp_eradicated_by_setting_FNs: Make sure no species is eradicated by setting false negative...

make_sure_no_spp_eradicated_by_setting_FNsR Documentation

Make sure no species is eradicated by setting false negative errors.

Description

Randomly setting false negatives can end up wiping out all occurrences of a species. While this doesn't break anything and does actually happen in the real world (i.e., a species is undetected), it can distort tests of greedy reserve selectors because of the way that the bdpg code currently designates the solution of a greedy selector. That is, it keeps adding patches in descending order of patch rank until it has reached the target for every species. If a species has been accidentally eradicated by the addition of FNs, then the algorithm will end up adding every single patch to the solution because it never hits its stopping criteria. Meanwhile, non-greedy algorithms like marxan don't have to meet every target when they choose a solution. They try to meet it but don't necessarily succeed. This means that they generally don't return the entire landscape as a solution.

Usage

make_sure_no_spp_eradicated_by_setting_FNs(
  bpm,
  old_occ_cts_for_spp,
  min_allowed_num_occ_per_spp = 1
)

Arguments

bpm

bipartite matrix; integer matrix with one row for each species and one column for each planning unit. Each matrix entry specifies whether that species occupies that planning unit; 1 indicates the species does occupy the planning unit and 0 indicates it does not. Same as occ_matrix.

old_occ_cts_for_spp

numeric vector

min_allowed_num_occ_per_spp

integer

Details

The function make_sure_no_spp_eradicated_by_setting_FNs() looks at each species in the occurrence matrix and if any species has no occurrences due to the addition of FNs, then one of its FNs is randomly chosen and undone, i.e., reverted back to being a TP.

Value

Returns bpm matrix where every species has at least one occurrence


langfob/bdpg documentation built on Dec. 8, 2022, 5:33 a.m.